CCCD Chip Reading and Verification via NFC
This document highlights the CCCD Chip Reading and Verification via NFC details.
Objective
The CCCD Chip Reading and Verification via NFC module extracts user information from the chip embedded in CCCD National ID(NID) card (or a Citizen ID card) and validates it against the national database.
Near-field communication (NFC) is a short-range wireless technology that aides communication between NFC-enabled devices in close proximity to each other.
| Input | Output |
|---|---|
| The following values associated with the user's NID: • ID Number • Date of Birth • Date of Expiry | The user's Personally identifiable information (PII) extracted from the national database, the associated verification status and the suggested action for the identity verification process. You can find the details of all the output fields under the success response details section. |
Prerequisites
- iOS
- Android
Permissions
-
Add
Privacy - NFC Scan Usage Descriptionkey in theInfo.Plistfile. -
Add the following reader key in the
Info.Plistfile:
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>com.apple.developer.nfc.readersession.iso7816.select-identifiers</string>
<string>A0000002471001</string>
<string>00000000000000</string>
</array>
- Under the
Signing & Capabilitiestab fromxcodeproj, click on the + Capability button and add Near Field Communication capability
Permissions
Add the following permission under the AndroidManifest.xml file:
<uses-feature
android:name="android.hardware.nfc"
android:required="true" />
<uses-permission android:name="android.permission.NFC" />
Integration
Add the following line of code to the build.gradle file along with HyperKYC:
implementation ("co.hyperverge:hvnfc-sdk:2.1.0")
Inputs
The following table provides the details of the input parameters required for the module:
| Parameter | Mandatory or Optional | Data Type | Accepted Values | Description |
|---|---|---|---|---|
| idNumber | Mandatory | string | A valid Vietnamese citizen identification number | The twelve digit identification number of the user |
| dateOfBirth | Mandatory | string | Format: DD-MM-YYYY | The date of birth of the user |
| dateOfExpiry | Mandatory | string | Not applicable | The date of expiry of the user's identity card |
Success Responses
The following section presents the successful responses generated by the module:
- Read Only
- Read and Verify
The following is a success response returned when the Read Only configuration parameter for the module is set to true:
{
"status": "success",
"statusCode": "200",
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
},
"result": {
"details": {
"status": 200,
"requestId": "<Request_ID>",
"citizenId": "<Masked_Citizen_ID>",
"oldCitizenId": "<Masked_Old_Citizen_ID>",
"fullName": "<Full_Name>",
"dateOfBirth": "<Date_Of_Birth_in_DD-MM-YYYY_Format>",
"dateOfIssue": "<Date_Of_Issue_in_DD-MM-YYYY_Format>",
"dateOfExpiry": "<Date_Of_Expiry_in_DD-MM-YYYY_Format>",
"gender": "<Gender>",
"nationality": "<Nationality>",
"ethnicity": "<Ethnicity>",
"religion": "<Religion>",
"placeOfOrigin": "<Place_Of_Origin>",
"placeOfResidence": "<Place_Of_Residence>",
"personalIdentification": "<Personal_Identification>",
"fatherName": "<Father_Name>",
"motherName": "<Mother_Name>",
"partnerName": "<Partner_Name>",
"mrz": "<MRZ_Code>",
"faceImage": "<Base64_Encoded_Face_Image>",
"vendorSignature": "<Base64_Encoded_Vendor_Signature>"
},
"summary": {
"action": "pass",
"details": []
}
}
}
The following is a success response returned when the Read Only configuration parameter for the module is set to false:
{
"status": "success",
"statusCode": "200",
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
},
"result": {
"details": {
"status": 200,
"requestId": "<Request_ID>",
"verifyRequestId": "<Verify_Request_ID>",
"citizenId": "<Masked_Citizen_ID>",
"oldCitizenId": "<Masked_Old_Citizen_ID>",
"fullName": "<Full_Name>",
"dateOfBirth": "<Date_Of_Birth_in_DD-MM-YYYY_Format>",
"dateOfIssue": "<Date_Of_Issue_in_DD-MM-YYYY_Format>",
"dateOfExpiry": "<Date_Of_Expiry_in_DD-MM-YYYY_Format>",
"gender": "<Gender>",
"nationality": "<Nationality>",
"ethnicity": "<Ethnicity>",
"religion": "<Religion>",
"placeOfOrigin": "<Place_Of_Origin>",
"placeOfResidence": "<Place_Of_Residence>",
"personalIdentification": "<Personal_Identification>",
"fatherName": "<Father_Name>",
"motherName": "<Mother_Name>",
"partnerName": "<Partner_Name>",
"mrz": "<MRZ_Code>",
"faceImage": "<Base64_Encoded_Face_Image>",
"vendorSignature": "<Base64_Encoded_Vendor_Signature>"
},
"summary": {
"action": "pass",
"details": []
}
}
}
Success Response Details
- Read Only
- Read And Verify
The following table provides the details of the fields in a success response when the module has a Read Only configuration:
| Field | Type | Description |
|---|---|---|
| status | number | The status of the request. |
| requestId | string | The request identifier for HyperVerge's internal reference |
| citizenId | string | The user's 12-digit National Identification Number (NID). |
| oldCitizenId | string | The user's old 9-digit National Identification Number (NID). |
| fullName | string | The user's complete name (Vietnamese). |
| dateOfBirth | string | The date of birth in the format dd-mm-yyyy. |
| dateOfIssue | string | The date of issue in the format dd-mm-yyyy. |
| dateOfExpiry | string | The date of expiry in the format dd-mm-yyyy. |
| gender | string | The user's gender (M: Male, F: Female). |
| nationality | string | The user's nationality(default: Việt Nam). |
| ethnicity | string | The user's ethnicity from the 64 ethnic groups in Vietnam. |
| religion | string | The user's religion. |
| placeOfOrigin | string | The user's hometown. |
| placeOfResidence | string | The user's living address at the time of registration. |
| personalIdentification | string | A personal mark of identity. |
| fatherName | string | The full name of the user's father. |
| motherName | string | The full name of the user's mother. |
| partnerName | string | The full name of the user's spouse. |
| faceImage | base64 | The image on the Vietnam National Identification Document (NID). |
| mrz | string | The MRZ code of the individual's document |
| vendorSignature | string | The base64-encoded vendor signature |
In addition to the fields present in a success response for a Read Only configuration, a success response for the Read and Verify configuration contains the following fields:
| Parameter | Type | Description |
|---|---|---|
| verifyC06 | boolean | The verification status (true/false) of the user details against the national database. |
| vendorSignature | string | The base64-encoded vendor signature |
| vendorVerifySignature | string | The base64-encoded vendor verification signature |
| c06VerifySignature | string | The base64-encoded C06 verification signature |