Handle messages

Interpret WebSDK messages.

When providing the on handler, you will receive messages from the WebSDK for the selected message type (all of them are prefixed with idCheck).

Message type Payload Description

onReady

Empty

WebSDK resources have been loaded.

onInitialized

Empty

The first screen is rendered.

onStepInitiated

{ "idDocSetType": "$idDocSetType", "types": ["$idDocType1", "$idDocType2"] }

A screen that corresponds to $idDocSetType was shown.

  • WebSDK — stepCompleted or onStepCompleted
  • WebSDK 2.0 — onStepCompleted

In WebSDK:

{ "step": "$idDocSetType" }

In WebSDK and WebSDK 2.0:

{ "idDocSetType": "$idDocSetType" }

Step $idDocSetType has been completed.

onApplicantLoaded

{ "applicantId": "$id" }

Applicant with id $id has been loaded.

onApplicantSubmitted

Empty

Documents were submitted for verification.

  • WebSDK — applicantStatus
  • WebSDK 2.0 — onApplicantStatusChanged
{ "reprocessing": false, "levelName": "$levelName", "createDate": "$createDate", "expireDate": "$expireDate", "reviewStatus": "$reviewStatus", "autoChecked": false }

Applicant status has been changed.

onApplicantResubmitted

Empty

Documents re-submitted for verification.

onApplicantActionSubmitted

Empty

Applicant action was submitted.

onApplicantActionCompleted

{ "action": "$actionType", "applicantActionId": "$id", "answer": "$answer" }

Applicant action $id was completed.

moduleResultPresented

{ "answer": "GREEN" }

The result of the standalone module has been presented to the user. Valid only for the "module" customization types. Happens either when the user has just completed the check or when user reopened the module for the previously completed check.

Possible answers:

  • GREEN — check was successful.
  • YELLOW — user is allowed to proceed, final check result will be determined later.
  • RED — user has been decisively rejected and is not allowed to proceed.

Not shown if the rejection is not final.

onResize

{ "height": 159 }

WebSDK frame has been resized.

onVideoIdentCallStarted

Empty

Video call was started by the user.

onVideoIdentModeratorJoined

Empty

Video call was answered by operator.

onVideoIdentCompleted

Empty

Video call was completed by operator.

onUploadError

{ "code": "$error", "msg": "Error message" }

Uploaded document was rejected.

onUploadWarning

{ "code": "$warning", "msg": "Warning message" }

Warnings about the uploaded document.