---
name: buy-tickets
description: Find and reserve event tickets through the VoordeMensen REST API and hand the buyer a payment URL.
---

# Buy tickets on VoordeMensen

Each client has a shop identified by a client shortname. Use the requested shop's client
throughout the flow. API base: `https://api.voordemensen.nl/v1/{client}`.
Read the shop's `/llms-full.txt` and `/openapi.yaml` for endpoint details. These public
endpoints do not require an API key. Follow HTTP redirects and preserve cart/session cookies.

## Host website integrations
For a venue or festival website, use the official VoordeMensen frontend through the side loader:
`https://tickets.voordemensen.nl/{client}/event/vdm_sideloader.js`.
Do not reproduce the checkout frontend from these examples. For seat maps, required custom
fields or other choices not covered by the API documentation, hand the buyer to the official
shop at `https://tickets.voordemensen.nl/{client}/m/o/{sub_event_id}`.

## Flow
1. `GET /events`: find the requested performance in `sub_events`. Check its date and published
   status; use the sub event ID for booking, not its main event ID.
2. `GET /tickettypes/{event_id}` and `GET /events/{event_id}/avail`: inspect ticket types,
   prices and availability. Use the returned encoded `discount_id`; do not invent one or
   select a membership/concession rate without the buyer's eligibility.
3. `GET /paymentmethods`: retrieve payment IDs and fees. Confirm the buyer's selection,
   quantity and cost before placing an order.
4. `POST /cart`: keep the returned `cart_id`.
5. `POST /cart/{cart_id}` with JSON `event_id`, `numberoftickets` and `discount_id`.
   `GET /cart/{cart_id}` verifies the actual reserved tickets and total. Reservations can expire;
   an availability response alone does not reserve tickets.
6. `POST /order/create` as `application/x-www-form-urlencoded` with `cart_id`, `payment_id`,
   `email`, `firstname` and `lastname`, using buyer-provided contact information.
7. Inspect the response body for errors, even after HTTP 200. On success, keep `order_key`
   and give the buyer the returned `url` to complete payment. An order or payment URL does
   not mean payment succeeded. Do not blindly repeat order creation after an ambiguous response.
8. `GET /order/{order_key}` retrieves the order's payment status and total including fees.
   Report the actual status; do not claim tickets are paid or delivered before confirmation.

## Reference
- Full guidance: `/llms-full.txt`
- OpenAPI: `/openapi.yaml`
- API catalog: `/.well-known/api-catalog`
- Human documentation: https://docs.voordemensen.nl/api/introduction