Callbacks

Interpret WebSDK messages.

When providing the on handler, you will receive messages from the WebSDK for the selected callback message type

onLoad & onReady

The onLoad callback is called when the workflow finishes loading and is ready to be displayed.

The onReady callback is called when the workflow is ready for user interaction.

onComplete

The onComplete callback is called when the workflow has completed and the individual clicks on the complete button to close the flow.

onEvent

The onEvent callback is called at certain points in the One Stop flow.

Event NameDescription
startTriggered when a workflow has been created in the individual
document-country-selectThe individual selected the country of government ID verification.
document-type-selectThe individual selected the type of government ID verification.
document-camera-captureThe individual took a photo for the government ID verification.
document-capture-failureThe individual took a photo for the government ID verification, but an error occurred.
document-uploadThe individual uploaded a government ID photo.
selfie-camera-captureThe individual took a photo for the selfie verification.
selfie-capture-failureThe individual took a photo for the selfie verification, but an error occurred.
enable-cameraAsk for the camera permission
retryThe individual accessed the retry page
failureThe workflow failure
cross-device
formThe individual accessed the form page.
form-submitThe individual submitted the form.
declineThe individual accessed the decline page.
successThe individual accessed the success page.
pendingThe individual accessed the pending page.
completeThe individual is exiting the flow after verifying their identity.
video-recordedThe individual has completed the liveness verification, and video data was captured successfully. only captureConfig.type is video trigger.
start-image-captureThe event that starts capturing an image. Only captureConfig.type is image trigger.
image-captureThe event that an image has been captured. Only captureConfig.type is image trigger.
stop-image-captureThe event that stops capturing an image. Only captureConfig.type is image trigger.