Skip to main content

ID Card Validation

Description

The ID Card Validation module implements Optical character recognition (OCR) to extract text from officially valid documents (OVDs). In addition to OCR, it also performs certain additional quality checks on the ID image.

It performs the following functions:

  • [Optional Step] Prompts the user to select their ID card from a list of supported IDs
  • Prompts the user to capture their ID card image
  • Extracts text from the ID images and performs quality checks
InputOutput
The user's identity card or document in an image or PDF forma An image of any of the officially valid documents supported by HyperVerge, the associated country and the document typeThe data extracted from the document

    Configurations

    FeatureDescriptionDefault Value
    Documents SupportedThis is the list of documents to be shown to the user in the 'document picker' page-
    Show Instructions ScreenEnable or disable the 'capture instructions screen' shown before the capture screenYes
    Allow UploadAllow an option for users to 'upload' their ID card images instead of just capture.
    Recommendation: It is recommended to not allow upload, as it is hard to control quality of images submitted
    No
    Quality and Other ChecksYou can configure additional checks to be performed on the ID card as mentioned on the Quality and Other Checks pageNo

    Module Input

    Country ID:

    • The country ID is required to ensure the correct region for the OCR; to pertain to compliance reasons and optimise for speed
    • If your users are from a single country, it can be hardcoded in the workflow. Otherwise, the countryID can be passed from HyperVerge's 'Country picker screen' or by providing countryID as an input to the workflow The following table provides the complete information on all the input parameters for the module.
    ParameterDescriptionMandatory or OptionalAllowed ValuesDefault Value
    ipThe IP address for verification OptionalNot ApplicableThe public IP* address of the end user's system

    Success Scenario

    The following information is returned in the Results API

    {
    "module": "ID Card Validation - Front Side",
    "moduleId": "id_card_validation",
    "expectedDocumentSide": "front",
    "countrySelected": "ind",
    "documentSelected": "pan",
    "attempts": "2",
    "imageUrl": "",
    "apiResponse": {
    "status": "success",
    "statusCode": 200,
    "metadata": {
    "requestId": "1659160094552-63a7ebac-ee69-4012-b2e7-52041579bec1",
    "transactionId": "12345"
    },
    "result": {
    "details": [
    {
    "idType": "<ID Type>",
    "fieldsExtracted": {
    "fullName": {
    "value": "LAARNI"
    },
    "dateOfBirth": {
    "value": "26-04-1992"
    },
    "dateOfIssue": {
    "value": ""
    },
    "dateOfExpiry": {
    "value": ""
    },
    "address": {
    "value": "15, Yemen road, Yemen",
    "houseNumber": "",
    "province": "",
    "street": "",
    "district": "",
    "zipCode": "",
    "additionalInfo": ""
    },
    "gender": {
    "value": "F"
    },
    "idNumber": {
    "value": "1234567890"
    },
    "placeOfBirth": {
    "value": ""
    },
    ...

    },
    "croppedImageUrl": "",
    "qualityChecks": {
    "blur": {
    "value": "no"
    },
    "glare": {
    "value": "no"
    },
    "blackAndWhite": {
    "value": "no"
    },
    "capturedFromScreen": {
    "value": "no"
    }
    }
    }
    ],
    "summary": {
    "action": "pass",
    "details": []
    }
    }
    },
    "previousAttempts": [
    "<If the user had to retake the image, the corresponding results are mentioned here>"
    ]
    }

    Understanding the Response

    KeyDescriptionValues Possible
    moduleName of the module that was setup in your workflow configID Card Validation - Front Side (or)
    ID Card Validation - Back Side
    moduleIdID of the moduleid_card_validation
    expectedDocumentSideDocument side that was expected to be capturedfront or back
    countrySelectedcountryId of country selected by user (or the countryID hardcoded in the workflow)Type: String
    List of countries and supported documents
    documentSelecteddocumentId of document selected by user(or the documentId hardocded in the workflow)Type: String
    List of countries and supported documents
    imageUrlSinged URL of the image captured by user. This URL would be valid for a duration of 15 minutesURL
    attemptsNumber of attempts made by user for this moduleId + expectedDocumentSide combinationNumber
    apiResponseThe ID card validation results provided by HyperVerge's backend for this input image. If there were multiple attempts made by the user, this key will contain the latest attemptJSON
    previousAttemptsIf there were multiple attempts made by the users, this array will contain the older attempts, sorted from latest to oldestJSON Array

    Understanding 'apiResponse'

    KeyDescriptionValues Possible
    idTypeID card type detectedString
    fieldsExtractedFields extracted from the ID cardJSON
    qualityChecksResults of quality checks performed on the ID card
    More details in the next section
    JSON
    croppedImageUrlURL of cropped and aligned ID imageURL String
    summaryA final summary given to this ID image based on all the checks and OCR extraction confidence
    What is summary?
    Default Summary Config
    JSON

    Understanding 'Quality Checks'

    In addition to OCR, the ID validation module also performs certain quality checks on the ID image.

    Depending on the checks enabled in your workflow, all or a subset of the following quality checks would be available in your module response

    KeyDescriptionValues Possible
    BlurCheck if the ID image is blurredblur
    GlareCheck if glare is present on the imageglare
    Partial IDCheck if the ID is fully present in the framepartialId
    Black And WhiteCheck if the ID image is black & whiteblackAndWhite
    Captured From ScreenCheck if the image is captured from a screencapturedFromScreen

    Failure Scenarios

    Below is the response in Results API for a typical error scenario.

    {
    "module": "ID Card Validation - Front Side",
    "moduleId": "id_card_validation",
    "expectedDocumentSide": "front",
    "countrySelected": "ind",
    "documentSelected": "pan",
    "attempts": "2",
    "imageUrl": "",
    "apiResponse": {
    "status": "failure",
    "statusCode": 422,
    "metadata": {
    "requestId": "1659412867492-fd012a23-8286-448d-a11d-1362d42bbe43",
    "transactionId": "12345"
    },
    "result": {
    "error": "Document Not Detected",
    "summary": {
    "action": "fail",
    "details": [
    {
    "code": "112",
    "message": "Document Not detected"
    }
    ]
    }
    }
    },
    "previousAttempts": [
    "<If the user had to retake the image, the corresponding results are mentioned here>"
    ]
    }

    List of Errors Possible

    Below are all the errors possible in this module. The 'statusCode' is present under apiResponse

    StatusCodeSummaryDescription
    422Document not detectedWhen the AI could not detected the required document in the input image
    429Rate limit errorWhen the number of requests per minute has crossed the set limit for your credentials
    5xxServer ErrorPlease reachout to HyperVerge

    Default Summary Configuration

    Scenario'Action' in summary
    Document not detectedfail after 2 retakes
    Low AI confidence for ID number, Name & DOBmanualReview
    Quality check failedmanualReview after 2 retakes
    None of the abovepass
    Was this helpful?
    Ask AIBeta
    Hi! How can I help?
    Ask me anything about HyperVerge products, APIs, and SDKs.
    Try asking: