Skip to main content

Overview

The Web SDK ships two modules:
VerilockIdentity is designed for frontend use with a session token. VerilockApi requires an API key and must only be used from a backend server or secure environment.

Installation

Script tag

ES module

npm


VerilockIdentity renders a full-screen modal that walks the user through document capture, selfie, and verification — all inside the browser.

Quick start

Configuration

Methods

Verification steps

The modal progresses through these steps automatically:
  1. welcome — Greeting screen with instructions
  2. doc_front — Capture front of ID (camera or file upload)
  3. doc_back — Capture back of ID
  4. selfie — Selfie capture with face oval guide
  5. processing — Animated progress while the API verifies
  6. result — Approved or declined screen
Each step supports both camera capture and file upload. If the browser does not support camera access, it falls back to file upload automatically.
Use the onStep callback to track user progress in your analytics or show custom UI alongside the modal.

Closing the modal

The user can close the modal by clicking outside it or pressing the close button. You can also close it programmatically:

API Client

VerilockApi is a full-featured client for the Verilock REST API. It uses fetch() and works in modern browsers (for server-side rendering) and Node.js 18+.

Initialize

Sessions

AML Screening

Transaction Screening

Wallet Screening

Credentials

Additional endpoints


Integration Patterns

The default VerilockIdentity modal overlays your page. Best for single-page apps and checkout flows:

Iframe embed

Embed the hosted verification page in an iframe for a contained experience:
Listen for completion via postMessage:

Redirect

Redirect the user to the hosted verification page. They return to your redirect_url when finished:
The redirect URL receives ?session_id=ses_abc123&decision=approved as query parameters.

Error Handling

The API client throws VerilockError on failure:
The client automatically retries on 429 (rate limited) and 5xx (server error) responses with exponential backoff. You can configure this with the maxRetries option.