Skip to content
Lira APILira API

Environments

Lira provides two environments: sandbox for development and testing, and live for production traffic.


Overview

SandboxLive
Key prefixlira_sandbox_...lira_live_...
Real data processedNoYes
Real network queries madeNoYes
Use forDevelopment, QA, integration testingProduction traffic
CostFreeBilled per verification

The only difference between sandbox and live is the API key you use. No code changes are required when switching: update the X-API-Key value in your environment variables and everything else stays the same.

Warning

Never use a live API key in test or development code. If a live key is accidentally committed to version control or exposed in logs, revoke it immediately from the dashboard or via DELETE /client/api-keys/:id.


Sandbox test data

Use the following test inputs in sandbox. Each produces a deterministic result so you can test all branches of your integration code.

Bank accounts

Account NumberBank CodeCountryExpected result
0000000000000014NGstatus: success: returns "Test Account, Access Bank"
0000000001000014NGstatus: failed: ACCOUNT_NOT_FOUND
0000000002000014NGstatus: error: gateway error simulation
0000000000030GHstatus: success: returns "Test Account, Ghana Commercial Bank"

Note

Test account numbers are short (10 digits for Nigeria). In production, real Nigerian bank accounts are also 10 digits: this is the NUBAN format. Do not pad or modify these values when testing.

Phone numbers

Phone NumberCountryNetworkExpected result
08000000000NGstatus: success: returns "Test User"
08000000001NGstatus: failed: SUBSCRIBER_NOT_FOUND
0200000000GHMTNstatus: success: returns "Test User GH"

Async mode in sandbox

Async verifications in sandbox complete within a few seconds of submission, significantly faster than the live environment, which depends on real network response times. Use the same test data listed above.

When you submit a verification with "mode": "async" in sandbox, Lira returns status: pending immediately, then delivers a webhook event to your registered endpoint once processing completes. This lets you test your full async integration (including signature verification and event handling) without waiting for real network queries.

Note

Your webhook URL must be publicly reachable for sandbox deliveries. Use a tool like ngrok or Cloudflare Tunnel during local development to expose your local server.


Switching to production

When you are ready to go live:

  1. Create a live API key. Call POST /client/api-keys with "environment": "live" using your Bearer token. Store the key immediately. It is only shown once.

  2. Update your environment variable. Replace the lira_sandbox_... value with your lira_live_... key. Do not change any endpoint URLs or request formats.

  3. Ensure your webhook URL is HTTPS and publicly reachable. localhost and private IP ranges are not permitted in the live environment.

  4. Review the Go-Live Checklist before sending real traffic. See Go Live for the full checklist covering authentication, error handling, webhook security, and more.


Next steps