Web Capture Flow
The web capture flow is Verifa’s hosted verification experience. You create a session, redirect the user to the capture URL, and Verifa handles document scanning, selfie collection, liveness detection, and consent collection.
How it works
Step 1: Create a session
cURL
Python
JavaScript
Go
Key parameters
Step 2: Send the user to capture
Option A: Full-page redirect
The simplest approach. Redirect the user to the capture_url:
After the user completes the flow, they are redirected to your redirect_url
with query parameters:
Option B: Iframe embed
Embed the capture flow in your page:
Listen for completion via postMessage:
Option C: QR code
Display the qr_code_data_url so mobile users can scan and complete
verification on their phone:
This is useful for desktop-first flows where the user’s phone has a better camera.
Step 3: Capture flow screens
The capture flow guides the user through these screens (order depends on your
workflow’s data_requirements):
1. Consent
Biometric processing consent. Records timestamp, IP address, and consent version. Required before any data collection.
2. Document type selection
The user selects their document type:
- Passport
- Driver’s license
- National ID card
- Residence permit
Available types are scoped by the country parameter.
3. Document upload
Front side (required) and back side (if applicable). The capture UI provides:
- Real-time camera viewfinder with alignment guides
- Auto-capture when a document is detected
- Manual photo option as fallback
- Image quality feedback (blur, glare, resolution)
Documents are encrypted with AES-256-GCM immediately on upload. Maximum file size: 10 MB.
4. Selfie
Live selfie capture with alignment guide. The selfie is compared against the ID photo for face matching.
5. Liveness challenge
Three randomized challenges from: blink, smile, turn left, turn right, look up, nod, open mouth. Challenges are cryptographically bound to the session via a server-generated nonce to prevent replay attacks.
6. Additional data (optional)
If your workflow requires it:
- Email and phone — For risk scoring and OTP verification
- Address — For address validation checks
- Proof of address — Upload utility bill or bank statement
- SSN — For US-specific checks
Step 4: Handle the result
Via webhook (recommended)
Configure a webhook endpoint to receive real-time notifications:
See Webhooks for setup and signature verification.
Via polling
Poll the session status until it reaches a terminal state:
Once status is completed, fetch the result:
Capture token expiration
The capture URL token expires after 20 minutes by default. If the user
doesn’t complete the flow in time, the session status changes to expired.
To re-issue a token for an expired session:
This returns a new capture_url with a fresh token. Previously uploaded
documents are preserved.
Fraud signal collection
The capture flow automatically collects 150+ fraud signals in the background:
- Behavioral — Completion time, hesitation patterns, copy-paste detection, keystroke dynamics, mouse/touch patterns
- Device — Browser fingerprint, bot detection, virtual camera detection, WebGL analysis, memory constraints
- Network — IP consistency, user-agent tracking, timezone validation
- Document — EXIF metadata analysis, blur/glare detection, screen photo detection, forensic analysis
These signals feed into the risk_assessment check during workflow execution.
You don’t need to collect or submit them — the capture flow handles everything.
Theming
Customize the capture flow appearance in the Verifa dashboard under Settings > Organization (Theming section):
- Primary and accent colors
- Logo
- Font family
- Button styles
- Background colors
Error handling
If the capture flow encounters an error, the user sees an error screen with a retry option. Common errors:
Related
- Sessions — Full session lifecycle and API
- Choosing an Integration Method — Compare with other options
- Fraud Signals — What signals are collected during capture
- Testing — Test the capture flow in sandbox