The platform has no separate sandbox. You test your integration on your own account in the personal account, using a dedicated test scenario: it behaves exactly like a production one and keeps test sessions apart from your customers' sessions.
Preparation
- Create a test scenario: «KYC/AML» section → «KYC Editor» → «Create scenario», or «Create a copy» of your production scenario. Details are in the KYC/AML section guide.
- On the «General options» tab, take the «Scenario ID» and the «Secret key»: you need them to launch the widget and to encrypt clientKey.
- To test the REST API, issue a separate token in the «Access» → «API keys» section (Access Tokens).
- If you test the widget, add the domain of your test environment on the «Access» → «Allowed domains» tab. The widget works only on domains from this list and only over HTTPS; changes take effect within 2 minutes.
localhostand IP addresses cannot be added to the list: the test environment must open over https on a domain name.
Test data
- Do not use real customer data.
- Pass made-up values in clientKey, clientUser and questionnaire fields, for example
test_user_001. - Use placeholders such as
00000000-0000-0000-0000-000000000000for identifiers in examples and logs.
Checking the webhook
- Set up a temporary HTTPS endpoint that accepts POST requests and records their body.
- Enter its address in the scenario: «Callback options» tab → «Backend callback URL».
- Click «Send test request». On success, the message «Sent successfully» appears. The request is sent from your browser, so the endpoint must accept requests from the personal account page (CORS) and answer with the code 200. If the button shows an error while the endpoint is reachable, go on to the next step.
- Complete a test session and check that notifications reach the endpoint. Every delivery and your server's response are shown in the personal account on the «Callback Logs» tab.
Notification format and all settings: Webhooks.
What to keep in mind:
- By default, the webhook is sent on every change of the session result, and your server picks the final statuses itself. The «Notify only when the session is finalized» option leaves only the final events; we recommend the default mode.
- If «Encrypt POST body with secret key» is enabled, the body is encrypted with the scenario secret key: check that your server decrypts it.
- The platform waits 30 seconds for the endpoint to respond. If there is no 2xx response, the webhook is sent again — up to 15 attempts with a growing pause (details on the Webhooks page). If a notification still did not arrive, get the session outcome with kyc/session/status.
Scenarios to check
| Scenario | What to check |
|---|---|
| Successful verification | The widget calls successCb; the webhook or kyc/session/status returns status success |
| Rejection | successCb is not called; you get the outcome (for example, failed) from the webhook or kyc/session/status |
| A step fails, then passes on the second try | A webhook with status failed and secondsToLive above 0 arrives, then one with status success. Your server does not reject the user on the first failed |
| The tries of a step are used up | The widget shows the final failure screen; the webhook has status failed and the code [general] too many tries in errors — this is a final rejection. A new verification needs a new clientKey |
| User closed the widget | closeCb is called, and your application returns to its initial state. After a successful verification closeCb is called too — when the user presses «Return to website» |
| Your server answered a webhook with a 5xx error | The webhook arrives again with the same X-Webhook-Id; your server processes the event once |
| Session expired | The session was not completed within the lifetime set in the scenario: status expired |
| Reopening a finished session | finalizedCb is called with the session status |
Base the decision on the server status (webhook or kyc/session/status), not on widget callbacks. Status values: Session statuses.
Errors
If an API method returns an error, look up its code in the reference.
Error codes are explained on the Errors page.
Before going live
- Replace the test scenario ID with the production one.
- Add production domains to «Allowed domains».
- Set your production webhook handler address in the production scenario.