> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.idenfy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Testing and Sandbox

> Test your iDenfy integration with dummy verification results in the sandbox environment before going live with real users and documents.

## How to Test

iDenfy uses the same API URL for sandbox and production. Your API key determines which mode you're in.

**1. Get Sandbox API Keys**

Your sandbox keys are in [Dashboard → Settings → API Keys](https://documentation.idenfy.com/guides/dashboard/settings/api-keys.md).

**2. Set Up a Webhook Receiver**

Use one of these to inspect incoming webhooks:

```bash theme={"system"}
# Option 1: webhook.site (no setup)
# Go to https://webhook.site — you get a unique URL immediately

# Option 2: ngrok (tunnels to localhost)
ngrok http 3000
# Use the https URL it gives you
```

Paste the URL in [Dashboard → Settings → Webhooks](https://documentation.idenfy.com/guides/dashboard/settings/system-notifications-webhooks-emails.md).

**3. Create a Test Session**

```bash theme={"system"}
curl -X POST https://ivs.idenfy.com/api/v2/token \
  -u "SANDBOX_API_KEY:SANDBOX_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"clientId": "test-001"}'
```

**4. Run a Dummy Verification**

Use the [Sample Verification](https://documentation.idenfy.com/guides/dashboard/kyb/verification-sandbox-and-testing.md) feature in your Dashboard to generate mock results with predefined outcomes — no real documents needed.

***

## Simulating Different Outcomes

Use [Dummy Results](https://documentation.idenfy.com/kyc/dummy-results.md) to trigger specific verification statuses:

| Outcome | What to test in your app |
| - | - |
| **APPROVED** | Happy path — user gets access |
| **DENIED** | Show rejection message, offer retry |
| **SUSPECTED** | Check `fraudTags` / `mismatchTags`, make a decision |
| **EXPIRED** | Token timed out — prompt re-verification |

For AML screening, use [AML Dummy Results](https://documentation.idenfy.com/aml/dummy-results.md) to trigger sanctions/PEP matches.

For Soft KYC, use the [Soft KYC dummy people](https://documentation.idenfy.com/kyc/dummy-results.md#soft-kyc-dummy-data) to get predictable field statuses from `US_15` and `UK` checks.

***

## Go-Live Checklist

Before switching to production keys:

* [ ] **Webhooks** — all statuses handled (`APPROVED`, `DENIED`, `SUSPECTED`, `EXPIRED`)
* [ ] **Error handling** — graceful responses for 400, 401, 403, 429, 500
* [ ] **Token expiry** — tested what happens when user returns after session expires
* [ ] **Callback signing** — [HMAC verification](https://documentation.idenfy.com/security/callback-signing.md) implemented
* [ ] **IP whitelisting** — [iDenfy IPs whitelisted](https://documentation.idenfy.com/security/ip-whitelisting.md) on your webhook endpoint
* [ ] **Data storage** — `scanRef` stored in your database for each verification
* [ ] **Production webhook URL** — configured in Dashboard
* [ ] **Production API keys** — generated and stored securely (env vars, not code)

> [!WARNING]
>
> The most common go-live issue: **webhook endpoint returns non-2xx**. iDenfy retries, and in the meantime the user sees a "failed" redirect even though verification may have succeeded. Test your webhook endpoint thoroughly.


## Related topics

- [Environments](https://documentation.idenfy.com/environments.md)
- [Quickstart](https://documentation.idenfy.com/quickstart.md)
- [Shopify](https://documentation.idenfy.com/integrations/shopify.md)
- [BigCommerce](https://documentation.idenfy.com/integrations/bigcommerce.md)
- [Verification Sandbox and Testing](https://documentation.idenfy.com/guides/dashboard/kyb/verification-sandbox-and-testing.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.