• Camera Scanning
  • ID Parsing
  • DIVE
  • Web Services
  • Third Party Checks
  • Authentication
IDScan.net
  • DIVE
  • DIVE API
  • Web Library V2
  • Event Handlers
Search Results for

    Show / Hide Table of Contents
    • Introduction
      • Getting Started
      • Web Library License Key
      • Supported Document Types
      • Recommended Browsers
      • Supported Image File Types
      • Image Requirements
      • Hosting Options
      • Security
      • FAQ
    • DIVE API
      • Web Portal
        • Bearer Tokens
        • License Keys
        • Verification Requests
        • Reviewable Submissions
        • Suspicious Activity Monitoring
        • Settings
      • Integration Options
      • Web Library V2
        • Migration Guide
        • Installation
        • Configuration Settings
        • Functions
        • Event Handlers
        • Style Customizations
      • Additional Verification Services
      • API Manual
      • Overriding Server Settings
      • Verify Use Cases
      • Authentication Use Cases
      • Verification/Authentication Response
      • Error Codes
      • Swagger UI
      • DIVE Web API Demo
    • DIVE Online
      • Web Portal
      • Integration Options
      • Wrapper
        • Installation
        • Configuration Settings
        • Functions
        • Event Handlers
      • SMS
      • Webhooks
      • Callback URLs
      • API Manual
      • Swagger UI
    • Native SDKs
      • iOS SDK
      • Android SDK
      • Sample Apps
    • DIVE Web API Sample Apps
      • Client Side Sample Apps
        • Vanilla Javascript
        • Angular
        • Vue
        • React
        • Svelte
      • Backend Sample Apps
        • Express (Firebase Cloud Function)

    Web Library Event Handlers

    onChange - function which will be called after each step completes.

    Sample Input Parameter

    {
        "step": {
            "index": 2, // step number
            "img": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQA...", // base 64 encoded image
            "type": "pdf",  // step type
            "isAuto": false,  // how was the image captured
            "source": "file",  // what is the source of the image
            "trackString": "QAoeDUFOU0kgNjM2MDI2MDEwMkRMMDAzOTAyMj..."  // the trackstring field is included for the pdf step type
        }
    }
    

    onRetakeHook - function which will be called after the retake button is clicked

    Sample Input Parameter

    {
        "step": {
            "index": 3,  // step number
            "img": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABA...", // base 64 encoded image
            "type": "face",  // step type
            "isAuto": true,  // how was the image captured
            "source": "video"  // what is the source of the image
        }
    }
    

    onMounted - the function that will be called on the component mounted. This function doesn't return a value.

    onReset - function which will be called after reset all the steps button are clicked

    Sample Input Parameter

    {
        "steps": [
            {
                "index": 1,  // step number
                "img": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...",  // base 64 encoded image
                "type": "front",  // step type
                "isAuto": false,   // how was the image captured
                "source": "file"  // what is the source of the image
            },
            {
                "index": 2,
                "img": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQAB...",
                "type": "pdf",
                "isAuto": false,
                "source": "file",
                "trackString": "QAoeDUFOU0kgNjM2MDI2MDEwMkRMMDAzOTAyMjZ..."
            },
            {
                "index": 3,
                "img": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAA...",
                "type": "face",
                "isAuto": false,
                "source": "file"
            }
        ],
        "documentType": 1,  // the selected document type is encoded with an integer
       }
    

    onCameraError - function which will be called in case the camera is not available

    onReloaded - The function that will be called after the component finishes reloading. This function doesn't return a value.

    onError - The function that will be called on error. The response value is the object with the error code and the message

    {
        "name": "HttpError",
        "statusCode": 404,
        "header": "Server Side Problems",
        "content": "Please try again later"    
    }
    

    submit - function which will be called after clicking the submit button

    Sample Input Parameter

    {
        "event": "submit",
        "steps": [
            {
                "index": 1,
                "img": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAA...",
                "blob": {},
                "type": "front",
                "isAuto": false,
                "source": "file"
            },
            {
                "index": 2,
                "img": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAA...",
                "blob": {},
                "type": "pdf",
                "isAuto": false,
                "source": "file",
                "trackString": "QAoeDUFOU0kgNjM2MDI2MDEwMkRMMDAzOTAy..."
            },
            {
                "index": 3,
                "img": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAA...",
                "blob": {},
                "type": "face",
                "isAuto": false,
                "source": "file"
            }
        ],
        "documentType": 1,
        "selectedDocumentType": "DL",
        "metaData": "{\"userAgent\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36\",\"capturedMethod\":\"000\",\"version\":\"3.0.0\",\"logs\":{\"s\":{\"2\":44448,\"3\":9200,\"5\":27724}}}"
    }
    
    Back to top IDScan.net IDScan.net GitHub