Fetching Request Status
The ShuftiPro Web SDK provides a method for tracking the status of a verification request. fetchRequestStatus()
method allows you to retrieve the current status of a specific verification request by its reference ID. Upon receiving the status response, we can handle it accordingly within the provided callback function.
shuftiPro.fetchRequestStatus(reference, (response) => {
console.log('Verification status:', response);
});
Parameters
Parameters | Description |
---|---|
reference | Required: Yes Type: String The unique reference ID of the verification request you want to check. |
callback | Required: Yes A callback function to handle the status. |
Response Events
Some of response events are following:
Event | Description |
---|---|
request.unauthorized | The auth header is not correct and, client id/secret key may be invalid. |
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. |
request.timeout | This will occur if request has timed-out. |
info
You can check complete response of Shufti Pro from here