Integration guide
Test your website
Use your normal organiser account. Test orders, tickets and inventory are kept separate from live sales.
1. Start your local website
Run your website in VS Code. Copy its base address, for example http://127.0.0.1:5500. Leave out /dist/index.html or any other page path.
2. Save a test connection
In Developers & Integrations, choose On my computer and Test a purchase. Enter the base address, select your event and Save and continue.
The status should say Local testing · No real charges. Naija Tickets creates an isolated test copy of your event when needed; you do not switch accounts or workspaces.
3A. Try the no-code button
Choose your event and enter the full return page, for example http://127.0.0.1:5500/dist/index.html. Create test checkout link, then paste the link into your website’s Buy Tickets button.
You can also Download test website. Serve that file from your saved local address. A no-code button does not need a secret API key.
3B. Try the developer API
Choose Connect with the API and create a Test key with the recommended permissions. Keep it in your website’s backend environment.
Your server calls the main Naija Tickets API address. Use GET /api/v1/events for the test catalogue, POST /api/v1/checkout-sessions to start checkout, and GET /api/v1/checkout-sessions/{id} to verify the result. Use ticket IDs from the test catalogue.
For the included starter, register http://localhost:3010, copy examples/hosted-checkout/.env.example to .env.local, set NT_API_ORIGIN to your main Naija Tickets address and NT_API_KEY to your Test key, then run node node.mjs from that folder. It loads the environment file automatically, lists your assigned Test events and generates a temporary local cookie secret. NT_EVENT_ID is optional. A key in a static website .env does not wire its button; the button needs a running backend route.
node node.mjs4. Complete and check a purchase
Try a free ticket, then a Paystack Test payment. The checkout and event name are marked Test. Check the Test purchase activity below your link and verify the issued ticket. Test tickets cannot be used for entry at the live event.
Cancel another checkout. It must not appear as a paid order or issue a usable paid ticket. Live orders and inventory must remain unchanged.
Testing a hosted website
Choose On the internet and Test a purchase. Save your HTTPS domain and a return page on that domain, then create a Test checkout link or Test API key. The status says Hosted testing · No real charges.
When ready for customers, choose On the internet and Accept real purchases. Create a new Live link or key. Real purchases require activated Live payments.
If checkout is unavailable
An address error should tell you exactly which part to remove. Use the same hostname and port throughout setup and return.
If testing is unavailable, the platform administrator must enable single-project testing and apply its migration. Changing the label to Live does not fix testing. Do not use a Live link as a rehearsal.