ID Card OCR - Forgery and Rule Checks
The additional checks while performing OCR on documents are grouped into the following two categories:
- "CMND" represents Chung Minh Nhan Dan (Vietnamese Identity Card)
- "CCCD" represents the Citizen ID Card in Vietnam
Forgery Checks
| Type of Check | Supported Country | Supported Documents | Description | Parameter Name | Accepted Values | All Possible Response Values |
|---|---|---|---|---|---|---|
| Text | Vietnam | The front side of the following National IDs:
| Checks for forgery checks on the text. | forgeryChecks.text | "yes" or "no" | The response can be any one of the following.
|
| Photo | India, Vietnam | India
The front side of the following National IDs:
| Checks for forgery in the photograph. | forgeryChecks.photo | "yes" or "no" | The response can be any one of the following.
|
| Emblem | Vietnam | The front side of the old CMND national ID. | Checks if the National ID logo is tampered (only for front side) | forgeryChecks.emblem | "yes" or "no" | The response can be any one of the following.
|
| Date of Birth | Vietnam | The front side of the old CMND national ID. | Verifies the date of birth field. | forgeryChecks.dateOfBirth | "yes" or "no" | The response can be any one of the following.
|
| Colon in the date of birth | Vietnam | The front side of the old CMND national ID. | Verifies if the colon is present next to the date of birth field. | forgeryChecks.colonInDateOfBirth | "yes" or "no" | The response can be any one of the following.
|
| ID Number Length | Vietnam | The front side of the following National IDs:
| Verifies the length of the ID number for signs of forgery. | forgeryChecks.idNumberLength | "yes" or "no" | The response can be any one of the following.
|
| Expiry | Vietnam | The front side of the following National IDs:
| Checks if the ID card has expired based on the date of expiry (DOE). | forgeryChecks.expiry | "yes" or "no" | The response can be any one of the following.
|
| Province Mismatch | Vietnam | The front side of the following National IDs:
| Checks if the province is a match. | forgeryChecks.provinceMismatch | "yes" or "no" | The response can be any one of the following.
|
| Gender and DOB Mismatch | Vietnam | The front side of the following National IDs:
| Performs gender and date of birth check. | forgeryChecks.genderAndDOBMismatch | "yes" or "no" | The response can be any one of the following.
|
| Machine-readable Zone | Vietnam | The back side of the CCCD with chip. | Checks if the machine-readable zone (MRZ) has been tampered with. | forgeryChecks.mrz | "yes" or "no" | The response can be any one of the following.
|
| QR Mismatch | Vietnam | Compares the data extracted from the image using OCR with the data from the QR string input. Note Note: You need to add an additional parameter qrString in the OCR API request to enable this check. Also ensure that the countryId is "vnm" and documentId is "id" in the request. | forgeryChecks.qrMismatch | "yes" or "no" | The response can be any one of the following.
| |
| Face Photo | India, Vietnam, Philippines |
Support for new cards can be added on request/AI approval. | Verifies if the photo on an ID card is forged, such as being pasted over another photo. | forgeryChecks.facePhoto | "yes", "no" |
|
| Digital Text | India, Vietnam, Philippines |
Support for new cards can be added on request/AI approval. | Detects if the text on the ID card image has been digitally altered, limited to name, date of birth, and ID number. | forgeryChecks.digitalText | "yes", "no" |
|
| Physical Text | India, Vietnam, Philippines |
Support for new cards can be added on request/AI approval. | Identifies if the text on the ID card image has been physically modified, such as pasted-over text. Limited to name, date of birth, and ID number. | forgeryChecks.physicalText | "yes", "no" |
|
| Color Printout Check | Vietnam, Philippines |
Support for new cards can be added on request/AI approval. | Verifies if the ID card is a color printout. | forgeryChecks.colorPrintout | "yes", "no" |
|
| Photo | India |
| Checks if the input document is AI generated | forgeryChecks.detectAiForgery | "yes", "no" | The response can be any one of the following.
|
Details of the Response Values for the Forgery Checks
The response for a forgery check parameter can be any one of the following:
- "yes" - The image of the document in the input file has failed the test.
- "no" - The image of the document in the input file has passed the test.
- "not_applicable" - The check is not applicable for the type of document in the input file.
- "not_supported" - This is the standard response when the check does not support the type of the document in the input file.
Rule Checks
| Type of Check | Supported Country | Supported Documents | Description | Parameter Name | Accepted Values | All Possible Response Values |
|---|---|---|---|---|---|---|
| ID Number | All countries | Available for all cards on request. | Checks if the ID number has a valid format. | ruleChecks.idNumber | "yes" or "no" | The response can be any one of the following.
|
| Date of birth | All countries | All cards. | Checks if the date of birth has a valid format. | ruleChecks.dateOfBirth | "yes" or "no" | The response can be any one of the following.
|
| Date of issue | All countries | All cards. | Checks if the date of birth has a valid format. | ruleChecks.dateOfIssue | "yes" or "no" | The response can be any one of the following.
|
| Date of Expiry | All countries | All cards | Checks if the date of expiry has a valid format. | ruleChecks.dateOfExpiry | "yes" or "no" | The response can be any one of the following.
|
| Minimum Age Threshold | All countries | All cards | Checks if the age is greater than the configured minimum age value. | ruleChecks.minimumAgeThreshold | "yes" or "no" | The response can be any one of the following.
|
Module Response Structure
The following JSON structure is returned by the module upon the successful execution of forgery detection and rule-based checks:
{
"status": "success",
"statusCode": 200,
"metadata": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
},
"result": {
"details": [
{
"idType": "philsys",
"fieldsExtracted": {
"firstName": {
"value": "--masked--",
"confidence": "high"
},
"middleName": {
"value": "--masked--",
"confidence": "high"
},
"lastName": {
"value": "--masked--",
"confidence": "high"
},
"fullName": {
"value": "--masked--",
"confidence": "high"
},
"dateOfBirth": {
"value": "--masked--",
"confidence": "high"
},
"dateOfIssue": {
"value": "",
"confidence": "high"
},
"dateOfExpiry": {
"value": "",
"confidence": "high"
},
"countryCode": {
"value": "",
"confidence": "high"
},
"type": {
"value": "",
"confidence": "high"
},
"address": {
"value": "--masked--",
"confidence": "low",
"additionalInfo": "",
"street": "",
"houseNumber": "",
"district": "",
"province": "",
"zipCode": ""
},
"gender": {
"value": "",
"confidence": "high"
},
"idNumber": {
"value": "--masked--",
"confidence": "high"
},
"placeOfBirth": {
"value": "",
"confidence": "high"
},
"placeOfIssue": {
"value": "",
"confidence": "high"
},
"yearOfBirth": {
"value": "--masked--",
"confidence": "high"
},
"age": {
"value": "",
"confidence": "high"
},
"fatherName": {
"value": "",
"confidence": "high"
},
"motherName": {
"value": "",
"confidence": "high"
},
"husbandName": {
"value": "",
"confidence": "high"
},
"spouseName": {
"value": "",
"confidence": "high"
},
"nationality": {
"value": "",
"confidence": "high"
},
"mrzString": {
"value": "",
"idNumber": "",
"fullName": "",
"gender": "",
"dateOfBirth": "",
"dateOfExpiry": "",
"nationality": "",
"confidence": "high"
},
"homeTown": {
"value": "",
"confidence": "high"
}
},
"croppedImageUrl": "--masked--",
"forgeryChecks": {
"digitalText": {
"value": "no",
"confidence": "low"
},
"physicalText": {
"value": "no",
"confidence": "low"
},
"facePhoto": {
"value": "no",
"confidence": "high"
},
"colorPrintout": {
"value": "no",
"confidence": "high"
},
"aiForgery": {
"value": "not_supported",
"confidence": "high"
}
}
}
],
"summary": {
"action": "pass",
"details": []
}
}
}