Events and live inventory
List published events, dates and ticket types with real-time quantity_available.
One API for events, live inventory, hosted checkout and signed webhooks. Sell Ayatickets events inside your app, site or marketplace, for Ghana and beyond.
curl developers.ayatickets.com/api/v1/events -H "X-API-Key: ayt_test_..."
The platform
Read the catalog, take payment on hosted checkout and know the moment an order is paid. We handle pricing, stock and payments.
List published events, dates and ticket types with real-time quantity_available.
Create a session with one call and redirect the buyer. Payment details never touch your servers.
Checkout sessionsSigned order.paid, order.completed (live free checkout), order.failed and order.expired events, retried with backoff.
Built for developers
Six endpoints, one auth header and consistent JSON errors. Start with test keys, then swap to live without changing code.
Idempotency-Key on every checkoutcurl -X POST 'https://developers.ayatickets.com/api/v1/checkout-sessions' \
-H 'X-API-Key: ayt_test_...' \
-H 'Idempotency-Key: order-1042' \
-H 'Content-Type: application/json' \
-d '{
"event_id": 1933,
"eventdate_id": 5085,
"items": [{ "ticket_id": 508065, "quantity": 2 }],
"customer": { "name": "Ama Owusu", "email": "ama@example.com", "phone": "233200000000" },
"success_url": "https://yourapp.com/thanks",
"cancel_url": "https://yourapp.com/cart"
}'
const res = await fetch('https://developers.ayatickets.com/api/v1/checkout-sessions', {
method: 'POST',
headers: {
'X-API-Key': process.env.AYATICKETS_API_KEY,
'Idempotency-Key': 'order-1042',
'Content-Type': 'application/json',
},
body: JSON.stringify({
event_id: 1933,
eventdate_id: 5085,
items: [{ ticket_id: 508065, quantity: 2 }],
customer: { name: 'Ama Owusu', email: 'ama@example.com', phone: '233200000000' },
success_url: 'https://yourapp.com/thanks',
cancel_url: 'https://yourapp.com/cart',
}),
});
const { checkout_url } = await res.json();
// Send the buyer to checkout_url
$session = Http::withHeaders([
'X-API-Key' => env('AYATICKETS_API_KEY'),
'Idempotency-Key' => 'order-1042',
])->post('https://developers.ayatickets.com/api/v1/checkout-sessions', [
'event_id' => 1933,
'eventdate_id' => 5085,
'items' => [['ticket_id' => 508065, 'quantity' => 2]],
'customer' => ['name' => 'Ama Owusu', 'email' => 'ama@example.com', 'phone' => '233200000000'],
'success_url' => 'https://yourapp.com/thanks',
'cancel_url' => 'https://yourapp.com/cart',
]);
return redirect($session->json('checkout_url'));
How it works
Sign up free. Our team reviews new accounts before live keys are issued.
Use ayt_test_ keys to list events and run checkouts. No real money, no tickets held.
Add a webhook URL, switch to ayt_live_ keys and start selling.
Get sandbox keys in minutes. Talk to us when you're ready for production.