Menu

API integration

Testing every branch

Run each case with your sandbox key before going live. sandbox_outcome sets the decision while the real checks still run (any document photo works), so you can test your webhook handling without real IDs.

CASEHOWEXPECT
Approved"sandbox_outcome": "approved", complete the flowsession.approved, status approved
Declined"sandbox_outcome": "declined"session.rejected, status declined (no retry)
In review → decision"sandbox_outcome": "review", then approve or decline it in Panel → Review queuesession.manual_review, then session.approved / session.rejected
RetryNo sandbox_outcome; upload a photo with no document on itdocument.rejected with status in_progress; /result shows hint and retries_left
ResubmissionA review session → Panel → session → Request resubmissionsession.resubmitted; your backend sends a new sdk-link
ExpiredCreate a session and leave it unopened for 60 minsession.expired, status expired
Late userOpen the link after 15 min"Expired" on screen, no session.failed, 401 token.expired; your backend issues sdk-link
IdempotencySend POST /v1/sessions twice with the same Idempotency-KeyThe same session_id both times
Duplicate webhookProcess the same event_id twiceYour handler acts once
Bad signaturePOST /v1/webhooks/test, then change one byte of the body before verifyingYour handler rejects it

Why a test session goes to review

Without sandbox_outcome the real checks decide, and these send a session to review even when every photo is fine:

  • The same face under another applicant_external_id (duplicate_face): testing several users with your own face.
  • The same applicant_external_id with another person or date of birth (identity_changed).
  • The document and the selfie uploaded from different devices or browsers (device_changed).
  • US and Canadian documents (their barcode is not signed), a document from another country than the one chosen, or an expected_identity that does not match.
  • Your own rules: minimum_age, risk_review_level.

Sessions created in the panel (Sessions → New session) follow the same rules and send the same webhooks. Sandbox webhooks go to sandbox_webhook_url if you set one (Panel → My profile). Then work through Going live.