Skip to main content

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:

ParametersDescription
status_codeType: 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.
eventType: 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.
bodyType: Object
Contains additional details related to the verification request.
verification_urlType: String
URL for the verification flow if applicable (e.g., for redirecting the user)
emailType: String
User's email address if provided during initialization.
countryType: 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:

StatusDescription
200Success
400Bad Request (invalid payload)
401Unauthorized (invalid token)
info

For a complete list of ShuftiPro API status codes, refer to the documentation

Response Events

Some of response events are following:

EventDescription
request.pendingThis event is returned for all on-site verifications until the verification is completed or timeout.
verification.acceptedVerification accepted callback.
verification.declinedVerification declined callback.
verification.cancelledThis callback is returned when verification is cancelled midway by the end user.
request.receivedThis event states that the verification request has been received and is under processing.