Testing your integration

Every app has two sets of credentials: live and test. Test credentials work against sandbox users: INFRA accounts you create for testing, which verify with published test BVNs instead of a real ID. Nothing in the sandbox reaches a real identity provider or moves real money.

The rules#

  • Test credentials only ever see sandbox users, and live credentials only ever see real users. Mixing them returns 403 ENVIRONMENT_MISMATCH. This applies to Sign in with INFRA, INFRA Connect and Pay-As-You-Verify.
  • Claims issued in the sandbox are marked as test claims and are rejected on live credentials.
  • Pay-As-You-Verify on test credentials settles on Base Sepolia with test USDC.
  • Sandbox users never go through real document checks, so they cost nothing to verify.

Step by step#

  1. Get your test credentials — In the developer portal, open your app's Sandbox panel (the flask icon). Copy the test client ID, and choose Get a new test secret to see a test secret (shown once).
  2. Create a sandbox user — In the same panel, choose Create test user. You get an email and password for a new sandbox INFRA account (shown once).
  3. Verify the sandbox user — Sign in as that user at accounts.infraidentity.com. Verification asks for a test BVN instead of a real ID: 22222222222 passes.
  4. Run your integration — Use your test client ID and secret exactly as you would the live ones: Sign in with INFRA, redeem a Connect code the sandbox user creates, or run a Pay-As-You-Verify flow. When it all works, switch to your live credentials.

Test BVNs#

BVN Result
22222222222 Verified (Ada Sandbox)
11111111111 Rejected: name mismatch
33333333333 Rejected: not found (any other number behaves the same)
00000000000 Provider unavailable, to test your retry handling

From code#

// The same steps from code, with your developer portal session token
// 1) New test secret (live: mode 'live')
POST /api/v1/developer/apps/:appId/rotate-secret
{ "mode": "test" }
→ { "data": { "mode": "test", "clientId": "test_…", "clientSecret": "…" } }

// 2) New sandbox user
POST /api/v1/developer/test-users
{ "appId": "…" }
→ 201 { "data": { "userId": "…", "email": "sandbox-…@test.infra.local", "password": "…" } }

// Mixing environments
{ "success": false, "error": { "code": "ENVIRONMENT_MISMATCH",
  "message": "Test credentials only work with sandbox users. …" } }

This page as Markdown: /testing.md · All docs in one file: /llms-full.txt