Skip to main content

Test your integration

Test every journey your users can take, not only a successful one. This page explains the sandbox allowance you test with, then lists the journeys to try and what your site should do in each.

Sandbox​

New PrivateAV accounts start in sandbox mode, shown as Test Mode on the Dashboard's Billing page. The API reports it as sandboxMode: true in the Create Session response.

  • Sandbox verifications are real. The user uses a real camera and, when asked, a real ID. Results are produced exactly as in production. There are no test documents, magic values or switches that force a pass or a failure.
  • They are not billed. Up to 100 verified sessions are free. Sessions that do not end verified (unfinished, cancelled or expired) do not use the allowance.
  • Same keys, same API, same addresses. There is no separate test environment and no separate test keys. Webhooks are delivered in sandbox as in production.
  • The allowance is per account, shared by all keys and websites.

Without a paid subscription, your account stays in sandbox, and the 100 sandbox verifications are a one-time allowance. When they are used, new sessions show users a "Sandbox Limit Reached" screen until you subscribe in Billing.

With a paid subscription, an Owner or Admin can switch Test Mode back on in Billing to test changes without billed usage. The allowance is then 100 per billing period. When it is used, Test Mode switches off automatically and further verifications are billed as usual.

Keep an eye on how many sandbox verifications you have used on the Billing page, and plan your tests so you do not run out before launch.

Use only your own identity

Test with your own face and your own ID. Never use another person's ID, images of IDs found online, or a minor, to produce a failed result.

Journeys to test​

Using the WordPress code file?

The code already handles journeys 2 to 6 correctly. Run journeys 1, 3 and 5 by clicking through your site, and in journey 7 use only the Test button. Where a step mentions Validate Session or externalUserId, look the session up in the Dashboard's Verifications page instead.

Run each journey on desktop and on a phone, and in a private browser window so that you start as a new user. "Your site should" describes the behaviour of the examples in the integration guides.

1. Successful verification​

Do: start a verification and complete it with your own face (and ID if asked).

Your site should: return you to the page, confirm the result on the server, and show the protected content. Validate Session returns accessGranted: true with your externalUserId. If you have a webhook endpoint, it receives verification.completed.

2. Unsuccessful attempt​

You cannot force a failure, but you can see how the hosted page handles one. In L2, or in L1 when asked for an ID, show the camera a blank card instead of an ID, or hold the ID so it cannot be read.

You should see: the hosted page explains the problem and offers another attempt. It does not send you back to your site with a failure status. Then choose Return to site.

Your site should: handle the return without any parameters, show that the verification is not finished, and offer Continue verification, which resumes the same session. No access is granted.

3. Interrupted verification​

Do: start a verification, then close the tab before finishing. Go back to your site and click the verify button again within 10 minutes.

Your site should: send you back to the same session rather than create a new one. On a desktop, also try continue on your phone with the QR code, and finish on the phone: the desktop page follows and returns.

4. Cancelled verification (new-tab or popup only)​

Do: with the SDK in mode: 'new-tab', close the verification window before finishing.

Your site should: show that verification was closed and offer to start again. Validate Session returns status: "cancelled"; a webhook endpoint subscribed to it receives verification.cancelled.

5. Expired session​

Do: start a verification, then wait more than 10 minutes without finishing. Return to your site (or reload the return page).

Your site should: offer a new attempt. Validate Session returns 400 Session has expired. A webhook endpoint subscribed to it receives session.timeout. Clicking verify again creates a new session.

6. Tampering​

Do: after a successful verification, sign in as a different user (or use another private window) and open your return URL with the first user's sessionId and status=verified. Also try changing status on any return URL.

Your site should: grant nothing. The session belongs to the first user's externalUserId, and status is ignored.

7. Webhooks​

Do: in Configuration → Webhooks, click Test on your endpoint. Then send an unsigned request:

curl -i -X POST https://your-endpoint.example -H 'Content-Type: application/json' \
-d '{"event":"verification.completed","data":{"verified":true}}'

Your endpoint should: answer the test with 2xx without changing any user, and answer the unsigned request with 401. After journey 1, it should have received a real verification.completed with your externalUserId.

8. Configuration errors​

Do: temporarily set a wrong secret key on your server and start a verification.

Your site should: show a friendly "verification is unavailable" message, log the 401, and grant nothing. Restore the key afterwards.

Checking results in the Dashboard​

Verifications lists your sessions. Search by externalUserId or session ID to check what happened to a test session. Configuration → Webhooks shows each endpoint's delivery health.

Next​

When every journey behaves as described, work through the go-live checklist.