Create a payment request for an online payment for the order

Content

Resource URL

https://apps.ticketmatic.com/api/1/{accountname}/orders/{id}/paymentrequest

Example

Request

1use Ticketmatic\Endpoints\Orders;
2
3$result = Orders::postpaymentrequest($client, $id, array(
4    "language" => "nl",
5    "returnurl" => "https://returnurl.mywebsite.com/3457623",
6    "withcustomer" => true,
7));

Response

1object(\Ticketmatic\Model\Url) (1) {
2  ["url"]=>
3  string(26) "http://www.ticketmatic.com"
4}

Request

 1import (
 2    "github.com/ticketmatic/tm-go/ticketmatic"
 3    "github.com/ticketmatic/tm-go/ticketmatic/orders"
 4)
 5
 6result, err := orders.Postpaymentrequest(client, id, &ticketmatic.PaymentRequest{
 7    Language: "nl",
 8    Returnurl: "https://returnurl.mywebsite.com/3457623",
 9    Withcustomer: true,
10})

Response

1result := &ticketmatic.Url{
2    Url: "http://www.ticketmatic.com",
3}

Request

1POST /api/1/{accountname}/orders/{id}/paymentrequest HTTP/1.1
2Content-Type: application/json
3
4{
5    "language": "nl",
6    "returnurl": "https://returnurl.mywebsite.com/3457623",
7    "withcustomer": true
8}

Response

1HTTP/1.1 200 OK
2Content-Type: application/json
3
4{
5    "url": "http://www.ticketmatic.com"
6}

Request body fields

FieldDescription
language
string 
(required)

The language to be used during the payment processing

Example value:"nl"
returnurl
string 
(required)

The returnurl that will be called after the payment request was done.

Example value:"https://returnurl.mywebsite.com/3457623"
withcustomer
bool 
(required)

Create (or use an existing) customer with the PSP. The order needs a linked contact.

Example value:true

Type reference: PaymentRequest

Result fields

FieldDescription
url
string

Url.

Example value:"http://www.ticketmatic.com"

Type reference: Url