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
| Input | Output |
|---|---|
| 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 type | The data extracted from the document |
Configurations
| Feature | Description | Default Value |
|---|---|---|
| Documents Supported | This is the list of documents to be shown to the user in the 'document picker' page | - |
| Show Instructions Screen | Enable or disable the 'capture instructions screen' shown before the capture screen | Yes |
| Allow Upload | Allow 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 Checks | You can configure additional checks to be performed on the ID card as mentioned on the Quality and Other Checks page | No |
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.
| Parameter | Description | Mandatory or Optional | Allowed Values | Default Value |
|---|---|---|---|---|
ip | The IP address for verification | Optional | Not Applicable | The 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
| Key | Description | Values Possible |
|---|---|---|
| module | Name of the module that was setup in your workflow config | ID Card Validation - Front Side (or)ID Card Validation - Back Side |
| moduleId | ID of the module | id_card_validation |
| expectedDocumentSide | Document side that was expected to be captured | front or back |
| countrySelected | countryId of country selected by user (or the countryID hardcoded in the workflow) | Type: String List of countries and supported documents |
| documentSelected | documentId of document selected by user(or the documentId hardocded in the workflow) | Type: String List of countries and supported documents |
| imageUrl | Singed URL of the image captured by user. This URL would be valid for a duration of 15 minutes | URL |
| attempts | Number of attempts made by user for this moduleId + expectedDocumentSide combination | Number |
| apiResponse | The 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 attempt | JSON |
| previousAttempts | If there were multiple attempts made by the users, this array will contain the older attempts, sorted from latest to oldest | JSON Array |
Understanding 'apiResponse'
| Key | Description | Values Possible |
|---|---|---|
| idType | ID card type detected | String |
| fieldsExtracted | Fields extracted from the ID card | JSON |
| qualityChecks | Results of quality checks performed on the ID card More details in the next section | JSON |
| croppedImageUrl | URL of cropped and aligned ID image | URL String |
| summary | A 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
| Key | Description | Values Possible |
|---|---|---|
| Blur | Check if the ID image is blurred | blur |
| Glare | Check if glare is present on the image | glare |
| Partial ID | Check if the ID is fully present in the frame | partialId |
| Black And White | Check if the ID image is black & white | blackAndWhite |
| Captured From Screen | Check if the image is captured from a screen | capturedFromScreen |
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
| StatusCode | Summary | Description |
|---|---|---|
| 422 | Document not detected | When the AI could not detected the required document in the input image |
| 429 | Rate limit error | When the number of requests per minute has crossed the set limit for your credentials |
| 5xx | Server Error | Please reachout to HyperVerge |
Default Summary Configuration
| Scenario | 'Action' in summary |
|---|---|
| Document not detected | fail after 2 retakes |
| Low AI confidence for ID number, Name & DOB | manualReview |
| Quality check failed | manualReview after 2 retakes |
| None of the above | pass |