onVerifyComplete
User has successfully completed the verification process (Pass or Fail). Details about the verification result are passed in the result.verificationResponse member of the Response object.
result.verificationResponse member:
Property | Type | Description |
---|---|---|
verified | boolean | Has the user successfully verified? |
transactionID | string | Unique identifier for the transaction. Partner can retain this value for traceability. |
verificationMethodName | string | The verification method chosen by the user. Possible values: CreditCard, DriversLicense, SSN, CorporateEmail, PrintForm, Phone |
matchOutcomeName | string | Specific outcome for the verification request. Possible values: Pass, Pending (when the user has chosen an offline method of verification, such as Phone or PrintForm, matchOutcome will be ‘Pending’). |
matchCode | string | A code that identifies the field groups that are matched in the verification request. May be undefined. |
matchValues | object | Key/value map that contains matched fields and values (for CC or SSN verification). May be undefined. |
requestID | string | Unique identifier for the verification request. The Partner should retain this value for traceability. |
redirectURL | boolean | Return URL address passed by partner to send the user directly following onVerifyDone event. May be null. |
partnerDefinedUniqueID | string | Value passed by Partner in verify_config of the verification request. PRIVO returns this value in the onVerifyComplete event. Can be undefined. |
requestTimestamp | long | Timestamp of the completed verification request. |
locale | string | Location of the user as defined by their browser settings. |
identificationNumber | string | Unique number provided to user when an offline verification method is chosen. This value can be used by Partner and PRIVO to identify the given pending request. |
attemptId | string | Identifier used to notate the attempt request. |
message | string | For debug reasons - if error occurs error message will be provided here. May be null. |
Sample response:
{
"event": "verify-complete"
"result": {
"verificationResponse": {
"verified": true,
"verificationMethod": 5,
"matchOutcome": 1,
"redirectUrl": "",
"message": "",
"errors": [],
"requestTimestamp": 1633679265147,
"locale": "en-GB",
"identificationNumber": "",
"attemptId": 99208,
"verificationMethodName": "SSN",
"verificationOutcomeName": "Pass",
"transactionID": "71568127R55890",
"requestID": "331724",
"partnerDefinedUniqueID": "OTA3Mi49MTQ3NjE1NTg2OTM="
}
}
}
Sample code usage:
function verifySuccessCallback(response) {
if (!response.errorCode) {
//Handle verify success
alert('Awesome, you are verified!');
} else {
// Handle error
alert('Darn, something went wrong!'+'\n' +
'Error details: ' + response.errorMessage + '\n' +
'Error code: ' + response.errorCode + '\n' +
'In event: ' + response.event;
}
}