Ga naar hoofdinhoud

Order

Two endpoints to complete the ticketing flow:

  1. Create an order — converts the cart into an order and returns a payment URL.
  2. Get status — check if payment succeeded and retrieve ticket URLs.

Create order and proceed to checkout

POST /v1/:client_name/order/create

Converts the cart into an order and returns a URL where the user should be redirected to complete payment.

Path parameters

NameTypeDescription
client_namestringYour short client name

Request body

FieldTypeDescription
cart_idstringThe cart to check out
payment_idintegerID of the chosen payment method
redirectURLstringHTTPS URL to redirect the user to after payment. We append ?return=<order_key> so you can look up the status.
emailstringEmail address
firstnamestringFirst name
lastnamestringLast name
phonestringPhone number
addressstringAddress line
citystringCity
zipstringPostal code
avg_optinbooleanOpt-in for occasional contact about this order
avg_mailinglistbooleanOpt-in for the mailing list

Response

200 OK — order created, redirect the user to the URL:

[
{
"url": "https://link-to-paymentprovider",
"order_key": "unique-identifier-of-order"
}
]

Store the order_key so you can query the order status later.

Getting payment methods

Available payment methods depend on the client configuration. Ask support for the right payment_id values for your client — they correspond to "handling" records in our backend (cash, iDEAL, Bancontact, creditcard, PayPal, Bancontact, etc.).


Get status of order/payment

GET /v1/:client_name/order/:order_key

Check whether the order is paid and retrieve links to tickets and receipts.

Path parameters

NameTypeDescription
client_namestringYour short client name
order_keystringThe order key returned when the order was created

Response

200 OK — order status and asset links:

{
"order_payment_status": "paid",
"order_tickets_nr": 1,
"order_tickets_url": "https://tickets.voordemensen.nl/demo/order/XgFca-QmBxG-9WhAj-Osszb/ticket",
"order_receipt_url": "https://tickets.voordemensen.nl/demo/order/XgFca-QmBxG-9WhAj-Osszb/receipt",
"seats": [
{
"seat_id": 2904,
"event_name": "Your Event",
"event_type": null
}
]
}

Response fields

FieldTypeDescription
order_payment_statusstringpaid, pending, cancelled, partial, or none
order_tickets_nrintegerNumber of tickets in the order
order_tickets_urlstringPublic URL where the user can view/download their tickets
order_receipt_urlstringPublic URL for the receipt/invoice
seatsarrayList of tickets with minimal detail

After payment redirect

When the user returns to your redirectURL after payment, we add a query parameter:

https://yoursite.com/thanks?return=<order_key>

Use this order_key to query the status endpoint and show the user their tickets.

Payment statuses

StatusMeaning
paidPayment complete — user can see tickets
pendingPayment in progress (banking lag, manual invoice etc.)
cancelledUser cancelled or payment failed
partialPart of the order is paid (e.g. split payment)
noneNo payment attempt yet

Poll with reasonable intervals if you want to wait for pendingpaid transitions; do not poll more than once every 10 seconds.


See also: Cart · Events