Skip to content

Tickets and events

  • the Events module enabled, with published events and ticket categories
  • the site key and the site domain (payment return addresses must be on it)
  • a payment processor configured, for paid tickets

Paste it after the base prompt, then add Design without the AI look.

Build ticket sales on /api/site/v1/events.
1. Schedule: GET /events, grouped by day or month, with image, venue, starting price and "sold out".
2. Event page: GET /events/<code>. Description, gallery, map, ticket categories with seats left.
3. Quantity selector per category, plus a discount code. The total comes from POST /events/<code>/quote on every change.
4. Buyer details and the fields the event asks for.
5. Order: POST /events/<code>/orders with { name, email, lines, success_url, cancel_url, lang }.
- If you get payment_url, redirect there.
- If it is free, show the confirmation right away.
6. Return page: read order_token from the URL and GET /events/orders/<token> until the status is confirmed. Do not treat the payment as successful just because the person reached success_url.
7. Tickets: link to the PDF (/events/orders/<token>/pdf).
8. Sold out: waiting list form, POST /events/<code>/waitlist.
Events with an access code or an invitation: pass them as access and invite in the URL.
Event structured data on every page. On phones the buy button stays within reach.
When sales open, many people arrive at once:
- List and event page from a short cache, with identical requests merged.
- Fetch remaining seats fresh only when picking tickets.
- On 429 wait as long as Retry-After says; do not retry in a loop.
- Disable the pay button while the order is being sent.