Quickstart
Sell your first ticket from your own website in five steps. You create the event and send buyers to our checkout, and we run the queue, take the payment, email the tickets and scan them at the door.
The big picture#
- 1
Your server talks to api.eventtickets.dev with a secret key, so never call the API from the browser.
- 2
The buyer clicks Buy on your site and is sent to pay.eventtickets.dev to pay.
- 3
We email the tickets and tell your server with an order.paid webhook.
- 4
Your door staff scan the QR codes with our door app.
1. Make a test key#
In the dashboard, switch on Test mode, open Developers and press Create test key. Copy the key straight away, because it's only shown once (it starts with sk_test_).
Test keys only see test events and orders, and test payments never move real money. When you're ready, make a live key the same way with test mode off.
EVENTTICKETS_KEY=sk_test_...
2. Create an event#
Every event needs at least one price, in pence, so 1200 means £12.00. Prices sell in order, so when Early bird sells out, Standard goes on sale by itself. The prices you send here become a General admission ticket, and you can add passes, day tickets or VIP later with ticket types.
curl https://api.eventtickets.dev/v1/events \
-H "Authorization: Bearer $EVENTTICKETS_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Harbour Nights",
"starts_at": "2026-11-14T22:00:00Z",
"venue": "The Harbour Rooms",
"capacity": 400,
"tiers": [
{ "label": "Early bird", "price": 800, "capacity": 100 },
{ "label": "Standard", "price": 1200 }
]
}'Save the event's id from the response (it looks like evt_3f9a1c2b7d4e5f60), because you'll use it in every other call about this event.
3. Put it on sale#
New events start as drafts so you can check them first, and when you're happy you switch them on. In test mode that works straight away, but in live mode your first event needs our approval: submit it for review from the dashboard, and after that every live event goes on sale the same way.
curl -X PATCH https://api.eventtickets.dev/v1/events/evt_3f9a1c2b7d4e5f60 \
-H "Authorization: Bearer $EVENTTICKETS_KEY" \
-H "Content-Type: application/json" \
-d '{ "status": "on_sale" }'4. Send buyers to checkout#
When someone clicks Buy, your server creates a checkout session and redirects the buyer to its url. You only say which event and how many tickets: the price always comes from us, so nobody can change it in their browser.
const res = await fetch("https://api.eventtickets.dev/v1/checkout_sessions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.EVENTTICKETS_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
event_id: "evt_3f9a1c2b7d4e5f60",
quantity: 2,
success_url: "https://yoursite.com/thanks?order={ORDER_ID}",
}),
});
const session = await res.json();
// session.url is https://pay.eventtickets.dev/c/cs_...
return Response.redirect(session.url, 303);If you set the optional success_url, the buyer goes straight back to your site once they've paid, and we fill in {ORDER_ID} so you can show their tickets and wallet buttons: see After payment. Without it, they see our confirmation page with their tickets.
No website yet? Every event also has a ready-made page at its buy_url with a Buy button you can share.
5. Hear about paid orders#
Don't count a buyer reaching your success_url as proof they paid, because they might close the tab first. Instead, add a webhook endpoint in Developers and we'll POST you an order.paid event for every sale. See Webhooks.