Integration guide

From your website to a verified ticket

Connect your live website or mobile app through your backend. Naija Tickets handles checkout, verified payment and admission tickets. Testing from the same dashboard is optional.

1. Use the main platform

Use the main Naija Tickets HTTPS address as your API base. The platform administrator must activate hosted checkout and Live payments before real sales. A website connection alone cannot activate the payment backend.

To test first, select Test a purchase in your normal dashboard and create a Test key. Your server uses the same API base; test records and inventory stay isolated.

2. Register an application

Sign in as an authorised organiser and open Developers & Integrations. Name the application, register your Live HTTPS website origin and assign a published event. For a mobile app, register its backend/return website and keep the secret key there. Only an owner or explicitly delegated integration manager can manage credentials.

An origin is the scheme, hostname and port, such as https://partner.example. It has no path. Test localhost HTTP is allowed; Live origins require public HTTPS. A return URL can add a simple path under that origin.

3. Create a server key

Select integration:read, events:read, tickets:read, availability:read, checkout:write and orders:read for an initial hosted checkout. Add external_events:write only when your website will create and update its own event records through the API. The secret appears once; keep it in your server environment. Rotation preserves scopes; existing keys never acquire new permissions automatically.

NT_API_BASE=https://naija-tickets.vercel.app
NT_API_KEY=YOUR_SERVER_LIVE_KEY
# Private server variables. Never embed a secret in a browser or mobile app.

4. Confirm the connection

Call introspection from your backend. Check environment, permissions and configured capability flags, then retrieve an assigned event. Capability flags describe deployment configuration, not payment-provider connectivity or a completed purchase.

curl "$NT_API_BASE/api/v1/integration" \
  -H "Authorization: Bearer $NT_API_KEY"
curl "$NT_API_BASE/api/v1/events?limit=20" \
  -H "Authorization: Bearer $NT_API_KEY"

5. Buy, verify and reconcile

Create checkout using the checkout guide. Verify the final payment status on your server and reconcile the order and admissions with the organiser records. Live payments charge the buyer. For a rehearsal without real charges, choose Test a purchase and a Test key. Keep the same idempotency key on retries.

A browser return saying paid is not payment proof. Never deliver access solely from query parameters. Use authoritative session status and signed, durably stored webhooks. Email testing is currently deferred.