Sandbox

AI Tools

The Yoti In-Branch Verification (IBV) Sandbox is an isolated testing environment for validating your integration with mock data and simulated verification outcomes.

What you can do

  • Test end-to-end flows without real user data
  • Simulate different verification outcomes (approvals, rejections, extractions)
  • Use standard Yoti backed SDKs (no separate sandbox SDK)
  • Manually test using the user view, or automate testing (via built-in agent) by bypassing the in-branch experience.

Key differences

Sandbox uses the same SDKs as production but requires:

  • Sandbox URL: https://api.yoti.com/sandbox/idverify/v1
  • Sandbox keys from Yoti Hub
  • Predefined successful responses by default
  • Optional response configuration (see Configure response)

Ensure you have a verified Yoti Hub account and have generated sandbox keys.

Sandbox keys

Install the SDK

Install the Yoti SDK using your language's package manager. The same SDK is used for both production and sandbox environments.

Javascript
PHP
Python
Java
Go
Copy

Once you have added the Yoti SDK dependency to your project, you can use it to build and send your request. See the code snippets below for examples of how to construct the request.

Step 1: Create the session

Create an in-branch verification session exactly as you would in production. The session configuration determines what checks and tasks will be performed.

Endpoint:

HTTP
Copy
Node.js
PHP
Python
Java
Go
Copy

Example Session Creation

Claimed ID JSON
Resultant ID JSON
Hybrid ID JSON
Copy

Example Response

If the request is successful and a session is generated the API will send a response in the form:

JSON
Copy
ResponseDescription
client_session_token_ttlTime in seconds until the client session expires
client_session_tokenUsed to authenticate the session
session_idID of the session

Step 2: Configure sandbox response

Now that you have successfully created a session, the next step is to set the response config. This is an optional step. If no response is configured, Yoti will use a default successful response. But you do have the option to set an expected outcome for your Yoti tasks and checks. This will be an object with defined task_results and check_reports.

Endpoint:

HTTP
Copy
Javascript
PHP
Python
Java
Go
Copy

Example Response Configuration

Claimed ID JSON
Resultant ID JSON
Hybrid ID JSON
Copy

On completion of this API request, you will simply receive a 200 response.

In the sandbox you can configure both successful outcomes of checks and unsuccessful outcomes of checks to mock multiple different scenarios. The below table outlines the different scenarios that can be mocked.

Checks

CheckReport templateDescription
ID_DOCUMENT_AUTHENTICITYSUCCESSThis simulates a "APPROVE" outcome for the document authenticity check
ID_DOCUMENT_AUTHENTICITYTAMPEREDThis simulates a "REJECT" outcome for the document authenticity check, due to a fraudulent document.
ID_DOCUMENT___AUTHENTICITYDOCUMENT_COPYThis simulates a "REJECT" outcome for the document authenticity check, due to an image of a document being used instead of a live capture.
ID_DOCUMENT_AUTHENTICITYPHOTO_TOO_BLURRYThis simulates a "NOT_AVAILABLE" outcome for the document authenticity check, due a blurry image.
ID_DOCUMENT_AUTHENTICITYFRAUD_LIST_MATCHThis simulates a "REJECT" outcome for the document authenticity check, due to a fraudulent document.
ID_DOCUMENT_AUTHENTICITYGLARE_OBSTRUCTIONThis simulates a "NOT_AVAILABLE" outcome for the document authenticity check, due to glare obstruction.
ID_DOCUMENT___FACE_MATCHSUCCESSThis simulates a "APPROVE" outcome for the face match check.
ID_DOCUMENT___FACE_MATCHAUTO_FAILThis simulates a "REJECT" outcome for the face match check. With the automated sub check failing.
ID_DOCUMENT_FACE_MATCHMANUAL_FAILThis simulates a "REJECT" outcome for the face match check. With the manual sub check failing.
ID_DOCUMENT_FACE_MATCHFAILThis simulates a "REJECT" outcome for the face match check. With both the automated and the manual sub check failing.
ID_DOCUMENT_TEXT_DATA_EXTRACTIONSUCCESSThis simulates a "APPROVE" outcome for the manual data extraction.
ID_DOCUMENT_TEXT_DATA_EXTRACTIONEXTRACTION_FAILEDThis simulates a "REJECT" outcome for the manual data extraction.

Tasks

TaskReport templateDescription
ID_DOCUMENT_TEXT_DATA_EXTRACTIONSUCCESSThis simulates a successful automated data extraction task.
ID_DOCUMENT_TEXT_DATA_EXTRACTIONUNSUPPORTED_DOCUMENTThis simulates an unsuccessful automated data extraction task.
ID_DOCUMENT_TEXT_DATA_EXTRACTIONDOCUMENT_IS_EXPIREDThis simulates a unsuccessful automated data extraction task.
ID_DOCUMENT_TEXT_DATA_EXTRACTIONUNABLE_TO_OCRThis simulates a unsuccessful automated data extraction task.

Step 3: Bypass In-Branch experience

Once you have set your sandbox response config, bypass the user view by making an API call to mock the user flow. The session Id and session token created in the earlier create session step must be used in the payload for this API request to work.

Endpoint

HTTP
Copy

Example Request

Javascript
PHP
Python
Java
Go
Copy

Payload Example

JSON
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated by Josh Steadman