Integration testing

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

  1. Create a test scenario: «KYC/AML» section → «KYC Editor» → «Create scenario», or make a copy of your production scenario. Details are in the KYC/AML section guide.
  2. On the «Main settings» tab, take the scenario ID and the secret key: you need them to launch the widget and to encrypt clientKey.
  3. To test the REST API, issue a separate token in the «Access» → «API keys» section (Access Tokens).
  4. 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.

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-000000000000 for identifiers in examples and logs.

Checking the webhook

  1. Set up a temporary HTTPS endpoint that accepts POST requests and records their body.
  2. Enter its address in the scenario: «Callback settings» tab → «Backend callback URL».
  3. Click «Send test request». On success, a confirmation message appears.
  4. Complete a test session and check that notifications reach the endpoint.

Notification format and all settings: Webhooks.

What to keep in mind:

  • By default, the webhook is sent on every session change. To receive only the outcome, enable the option to notify only when the session is finalized.
  • If body encryption with the 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 and does not retry. If a notification did not arrive, get the session outcome with kyc/session/status.

Scenarios to check

ScenarioWhat to check
Successful verificationThe widget calls successCb; the webhook or kyc/session/status returns status success
RejectionsuccessCb is not called; you get the outcome (for example, failed) from the webhook or kyc/session/status
User closed the widgetcloseCb is called, and your application returns to its initial state
Session expiredThe session was not completed within the lifetime set in the scenario: status expired
Reopening a finished sessionfinalizedCb 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.