Skip to main content

ID Card OCR - Forgery and Rule Checks

The additional checks while performing OCR on documents are grouped into the following two categories:

  1. Forgery Checks
  2. Rule Checks
info
  • "CMND" represents Chung Minh Nhan Dan (Vietnamese Identity Card)
  • "CCCD" represents the Citizen ID Card in Vietnam

Forgery Checks

Type of CheckSupported CountrySupported DocumentsDescriptionParameter NameAccepted ValuesAll Possible Response Values
TextVietnam
The front side of the following National IDs:
  • old CMND
  • new CMND
  • CCCD without chip
Checks for forgery checks on the text.forgeryChecks.text"yes" or "no"

The response can be any one of the following.

  • "yes"
  • "no"
  • "NA"
PhotoIndia, VietnamIndia
  • Aadhaar
  • PAN
Vietnam
The front side of the following National IDs:
  • old CMND
  • new CMND
  • CCCD without chip
  • CCCD with chip
Checks for forgery in the photograph.forgeryChecks.photo"yes" or "no"

The response can be any one of the following.

  • "yes"
  • "no"
  • "NA"
EmblemVietnamThe 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.
  • "yes"
  • "no"
  • "NA"
Date of BirthVietnamThe 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.
  • "yes"
  • "no"
  • "NA"
Colon in the date of birthVietnamThe 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.
  • "yes"
  • "no"
  • "NA"
ID Number LengthVietnam
The front side of the following National IDs:
  • old CMND
  • new CMND
  • CCCD without chip
  • CCCD with chip
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.
  • "yes"
  • "no"
  • "NA"
ExpiryVietnam
The front side of the following National IDs:
  • new CMND
  • CCCD without chip
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.
  • "yes"
  • "no"
  • "NA"
Province MismatchVietnam
The front side of the following National IDs:
  • old CMND
  • new CMND
  • CCCD without chip
  • CCCD with chip
Checks if the province is a match.forgeryChecks.provinceMismatch"yes" or "no"The response can be any one of the following.
  • "yes"
  • "no"
  • "NA"
Gender and DOB MismatchVietnam
The front side of the following National IDs:
  • new CMND
  • CCCD without chip
  • CCCD with chip
Performs gender and date of birth check.forgeryChecks.genderAndDOBMismatch"yes" or "no"The response can be any one of the following.
  • "yes"
  • "no"
  • "NA"
Machine-readable ZoneVietnamThe 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.

  • "yes"
  • "no"
QR MismatchVietnamCompares 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.

  • "yes"
  • "no"
Face PhotoIndia, Vietnam, Philippines
  • Aadhaar
  • PAN
  • VoterId
  • VNM NID (Front only, expectedDocumentSide or side should be sent as front)

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"
  • "yes"
  • "no"
  • "not_applicable"
  • "not_supported"
Digital TextIndia, Vietnam, Philippines
  • Aadhaar
  • PAN
  • VoterId
  • VNM NID (Front only, expectedDocumentSide or side should be sent as front)

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"
  • "yes"
  • "no"
  • "not_applicable"
  • "not_supported"
Physical TextIndia, Vietnam, Philippines
  • Aadhaar
  • PAN
  • VoterId
  • VNM NID (Front only, expectedDocumentSide or side should be sent as front)

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"
  • "yes"
  • "no"
  • "not_applicable"
  • "not_supported"
Color Printout CheckVietnam, Philippines
  • VNM NID (Front only, expectedDocumentSide or side should be sent as front)

Support for new cards can be added on request/AI approval.

Verifies if the ID card is a color printout.forgeryChecks.colorPrintout"yes", "no"
  • "yes"
  • "no"
  • "not_applicable"
  • "not_supported"
PhotoIndia
  • Aadhaar
  • PAN
  • DL
  • Passport
  • Voter ID
Checks if the input document is AI generatedforgeryChecks.detectAiForgery"yes", "no"

The response can be any one of the following.

  • "yes"
  • "no"
  • "not_supported" (returned when the input document is not one of the supported documents listed in the Supported Documents column)

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 CheckSupported CountrySupported DocumentsDescriptionParameter NameAccepted ValuesAll Possible Response Values
ID NumberAll countriesAvailable 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.

  • "yes"
  • "no"
Date of birthAll countriesAll 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.

  • "yes"
  • "no"
Date of issueAll countriesAll 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.

  • "yes"
  • "no"
Date of ExpiryAll countriesAll cardsChecks if the date of expiry has a valid format.ruleChecks.dateOfExpiry"yes" or "no"

The response can be any one of the following.

  • "yes"
  • "no"
Minimum Age ThresholdAll countriesAll cardsChecks 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.

  • "yes"
  • "no"

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": []
}
}
}
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: