Back to Guides
Testing Environment

Testing with Sandbox

Discover how to use our sandbox environment to simulate different verification outcomes without using real credentials.

Spidify provides a sandbox environment to test your integration without affecting live data or incur charges. You can simulate various verification scenarios to ensure your app handles all edge cases correctly.

Step 1: Get Test API Keys

Log in to your dashboard and toggle to "Test Mode" to access your test keys. Test keys always start with pk_test_ and sk_test_.

// Use your test keys
const spidify = new Spidify({
  publicKey: 'pk_test_...', // Test public key
  onSuccess: (result) => console.log('Verified!', result),
});

Step 2: Simulate Outcomes

In the sandbox environment, you can use specific test data to trigger different responses.

Simulate Success

Use any valid formatted NIN or BVN to simulate a successful verification.

Simulate Rejection

Use the number 00000000000 to simulate a failed verification or "no match" error.

Simulate Liveness Failure

When prompted for a selfie, covering your face or using a printed photo will trigger a liveness failure in the sandbox.

Step 3: Verify Webhooks

Webhooks work in test mode too! Make sure you set up a test webhook endpoint in your dashboard to receive events for sandbox verifications.