Verification Response
In case of WebSDK initialization with a journey_id, a callback function can be passed to the start() method. This will return a response containing information about the verification process.
The response includes the following key properties:
Parameters | Description |
---|---|
status_code | Type: int Shufti Pro Verification API uses conventional HTTP response codes to indicate the success or failure of an API request. Details can be found here. |
event | Type: String Events are sent in responses that show the status of the request. These events are sent in callbacks for both onsite and offsite verifications. |
body | Type: Object Contains additional details related to the verification request. |
verification_url | Type: String URL for the verification flow if applicable (e.g., for redirecting the user) |
Type: String User's email address if provided during initialization. | |
country | Type: String User's country if provided during initialization. |
Example Response Object
response-object
{
"body": {
"reference": "sp-bc-prod-xyz",
"event": "request.pending",
"verification_url": "https://app.shuftipro.com/verification/process/",
"email": null,
"country": null
},
"event": "request.pending",
"status_code": 200,
}
Response Status
Some of response status are following:
Status | Description |
---|---|
200 | Success |
400 | Bad Request (invalid payload) |
401 | Unauthorized (invalid token) |
info
For a complete list of ShuftiPro API status codes, refer to the documentation
Response Events
Some of response events are following:
Event | Description |
---|---|
request.pending | This event is returned for all on-site verifications until the verification is completed or timeout. |
verification.accepted | Verification accepted callback. |
verification.declined | Verification declined callback. |
verification.cancelled | This callback is returned when verification is cancelled midway by the end user. |
request.received | This event states that the verification request has been received and is under processing. |