How to mock E-KYC results
If you're just testing our software or want to integrate E-KYC in your application, the sandbox mode allows you to mock verification result data without needing to upload any sensitive data or images of sensitive data. There is an extra API route available that doesn't validate the verification before adding the result.
In sandbox mode, actual uploads in the E-KYC application will not be processed using OCR, and mock data is returned by default.
The verification can be created by either the dashboard or directly thought the API like usual. An example of calling the mock would look like this:
PUT /sandbox/verifications/:id/frontIdCards
Authentication: Bearer <public_key>
{
"edits": {
"citizenId": "1-1111-69420-42-0",
"issueDate": "2017-12-01",
"expiryDate": "2026-10-01",
"lastNameTh": "มาตนอก",
"dateOfBirth": "1993-10-01",
"firstNameTh": "ธัญวัลย์"
}
}
The request body can be empty, any input data will overwrite the default mock data that is configured. Calling this method is essentially validating the verification as if the id card contained the mock data, so it is important that when the verification you are trying to mock has fields such as firstName
, citizenId
or dateOfBirth
, those should be mocked explicitly in the request in order to get a verified
status.
To find all possible mock routes, including the appointments before sending a dip chipping rider, please refer to the API reference.
Updated over 2 years ago