HTML + Javascript
Steps to integrate the Web SDK into HTML and JavaScript application.
1. Installation
To install the Preventor Web SDK, add the following to your project:
Add https://sdk.preventor.com/pvtid/verifyme/verifyme.esm.js
as a script.
You have successfully installed the Preventor Web SDK!
2. Choose how you would like to integrate the verifyme
You can find your credentials on the Preventor platform
You have successfully Preventor SDK!
3. Prefilling configs
Prefill Flowtype
The flow type defines the biometric process so you must select a flow type.
You must assign the flow type code. If it is blank, it will take the flow type by default.
Prefill Credentials
You must set all credentials values to correctly consume our services.
Prefill Cif Code
The Cifcode is the unique customer profile code.
If the Cifcode is empty, a unique code is assigned.
Prefill Desk Verification Enabled
The skipStartPage skips the start page. It's false by default
Prefill Broker ID
Broker ID to be used in verification.
Prefill Events
It is an object that allows you to pass some callbacks to handle events of Preventor SDK.
Handling Verifications
To find out if a user has completed the verification process, canceled it or there was an error. To do this, you can implement the following callback methods:
onStart
This callback method is triggered once a user starts the verification flow.
onSubmitted
onFinish
Method that is being called once a user clicks the "Finish" button. This event emits the same data as the onSubmitted
event.
onError
This callback method fires when a user canceled the verification flow, the verification ended with an error, or the user performed an incorrect process. You can use this to find out the reason for the error.
Codes
Error codes
CANCELLED_BY_USER
The user cancelled the process before completion.
BIOMETRIC_AUTHENTICATION_FAILED
The user's biometric authentication failed.
SESSION_EXPIRED
The user's session timed out before completion.
BAD_STEP_BY_USER
The user made an error or incorrect input during the process.
MISSING_PARAMETERS
Required parameters were missing from the request or input.
CLIENT_NOT_FOUND
The client did not complete the enrollment process before performing the biometric authentication.
TIME_OUT
The request or process timed out before completion.
Disposition status codes
PASSED
Verification process passed successfully.
FAILED
Verification process failed.
PENDING
Verification process is still pending.
RETRY
Verification process failed and can be retried.
PROCESSING
Verification process is being processed by a server operation.
NEED_REVIEW
Verification process is awaiting manual review by a user.
TIMEOUT
Verification process timed out.
LOGGED_OUT
User logged out during the verification process.
LOST_CONNECTION
Connection to server lost during the verification process.
QUIT
User quit the verification process.
Flow status codes
IN_PROGRESS
Verification process is in progress.
ACCEPTED
Verification process has been accepted.
REJECTED
Verification process has been rejected.
ABANDONED
Verification process has been abandoned (not completed due to some reason, such as user dropping off).
Last updated