WebSdk
Overview
The Advance.AI Web SDK is a comprehensive identity verification solution that enables seamless integration of document verification (DV) and identity verification (IDV) capabilities into your web applications. With support for 50+ languages and optimized for global markets, it provides a secure, user-friendly, and reliable KYC experience.
What is Web SDK?
Web SDK is a lightweight, browser-based verification solution that allows your users to complete identity verification directly within their web browser—no app downloads or redirects required. It handles the entire verification flow, from document capture to liveness detection, while you maintain full control over the user experience.
Key Features
🎯 Complete Verification Suite
- Document Verification (DV): Capture and verify ID documents with intelligent quality checks
 - Identity Verification (IDV): Full KYC flow including document + liveness detection
 - Multiple Capture Methods: Auto-scan, manual capture, and gallery upload
 - Real-time Quality Feedback: Instant guidance for optimal document capture
 - Highly Customizable Flows: Extensive configuration of UI styles, functions, and multi-language support.
 - Graceful Fallback for Challenged Devices: Robust KYC flow degradation for devices with technical limitations.
 - Advanced Fraud Detection: Powerful fraud and spoofing detection capabilities.
 
🌍 Global Coverage
- 50+ Languages: Comprehensive language support for worldwide deployment
 - Multi-document Support: Passport, ID card, driver's license, and more
 - Extensive Device Compatibility: Full support for a wide range of devices, including iOS and Android smartphones, tablets, and desktop PCs.
 - Advanced Camera Adaptation: Optimized to perform consistently across different camera types, from high-end mobile sensors to standard desktop webcams.
 
🚀 Easy Integration
- 2 Integration Methods: Iframe embed or direct URL redirection
 - 5 Minutes Setup: Get started with minimal code
 - Flexible Configuration: Customize appearance and behavior
 - Comprehensive Events: Real-time status updates and callbacks
 
🔒 Security & Compliance
- Bank-grade Security: End-to-end encryption for all data
 - Anti-spoofing: Advanced liveness detection and fraud prevention
 - Session Management: Secure token-based authentication
 
📱 Optimized Experience
- Mobile-first Design: Responsive UI for all screen sizes
 - Smart Camera Handling: Automatic detection and quality optimization
 - Progressive Enhancement: Graceful degradation for older browsers
 - Performance Optimized: Fast loading and minimal resource usage
 
How It Works
┌─────────────┐
│   Your App  │
└──────┬──────┘
       │
       │ 1. Request verification URL/token
       ▼
┌─────────────────┐
│  AAI Backend    │  Generate secure session
└──────┬──────────┘
       │
       │ 2. Return URL/token
       ▼
┌─────────────┐
│   Your App  │  Embed iframe or redirect
└──────┬──────┘
       │
       │ 3. User interaction
       ▼
┌─────────────────┐
│   AAI Web SDK   │  Capture documents & liveness
│                 │  Real-time quality checks
│                 │  Submit to backend
└──────┬──────────┘
       │
       │ 4. Verification complete
       ▼
┌─────────────┐
│   Your App  │  Receive callback events
│             │  Handle verification under review
└─────────────┘
Supported Documents
Passport
- ✅ All countries
 - ✅ Machine-readable zone (MRZ) extraction
 - ✅ Single-page capture
 
ID Card (National ID)
- ✅ 150+ countries
 - ✅ Front and back capture
 
Driver's License
- ✅ Multiple countries
 - ✅ Front and back capture
 - ✅ Expiry date validation
 
Residence Permit
- ✅ Selected countries
 - ✅ Front and back capture
 
Browser Support
Minimal browser versions with support for all features required by H5 Document Verification.
| Chrome | Safari | Edge | Opera | iOS Safari | Android Browser | Chrome for Android | Internet Explorer | 
|---|---|---|---|---|---|---|---|
| 96 | 15 | 93 | 82 | 15 | 81 | 96 | Not supported | 
Sources:caniuse and WebAssembly Roadmap
Integration Methods
Method 1: Iframe Integration (Recommended)
Best for: Seamless in-app or pc experience
✅ Advantages:
- User stays on your domain
 - Full control over page context
 - Better branding and UX
 - Easy event communication
 
// Simple iframe integration
 <iframe src="kyc-generated-url-here" allow="autoplay;camera;clipboard-write;"></iframe>
window.addEventListener('message', (event) => {
  const { type, code, submissionStatus } = event.data;
  
  if (type === 'complete') {
    // 1. Listen for SUBMITTED status: capture material submission action
    if (submissionStatus === 'SUBMITTED') {
      console.log('KYC materials submitted');
      updateUserAuditStatus(); // Example: trigger business logic to update user audit status
      return;
    }
    
    // 2. Handle UNSUBMITTED status: unsubmitted material scenarios
    if (submissionStatus === 'UNSUBMITTED') {
      switch (code) {
          // 2.1 Specific codes execute corresponding handling logic				
        case 'CAMERA_ISSUE': //camera not supported or can not open camera(This event is sent only when the fallback flow is disabled in your configuration.)
          handleCameraIssue();
          break;
        case 'NOT_SUPPORT': // browser not support(wasm,getUserMedia api not support etc)(This event is sent only when the fallback flow is disabled in your configuration.)
          handleBrowserIssue();
          break;
          
        case 'RESELECT_REGION':
          handleReselectRegion();
          break;
          
        case 'RESELECT_DOC_TYPE':
          handleReselectDocType();
          break;
          
        // 2.2 Other codes guide to resubmit
        default:
          console.log('User did not successfully submit KYC materials');
          guideRetryKycProcess(); // Example: guide user to retry KYC submission process
          break;
      }
      return;
    }
  }
});Method 2: Direct URL Redirection
Best for: Simple integration, mobile deep links
✅ Advantages:
- Simplest to implement
 - Works well on mobile
 - No iframe restrictions
 - Good for MVP/testing
 
// Redirect to verification URL
window.location.href = YOUR_VERIFICATION_URL;
// Or open in new window
window.open(YOUR_VERIFICATION_URL, '_blank');Language Support
The Web SDK supports 50+ languages with full UI localization
Updated 7 days ago
