Skip to content

Read NFC ​

Submits the raw data groups read from a NID chip and returns the parsed cardholder identity, the chip portrait, and a verification_key your backend needs to complete the flow. Called by the Mobile SDK.

Endpoint ​

http
POST /v1/read_nfc
Content-Type: application/json
json
{
  "sod": "d4IG/TCCBvkGCSqGSIb3DQEHAqCC…",
  "dg1": "YV1fH1pJRFZOTTAwMXh4eHh4eHh4eA…",
  "dg2": "dYIx1n9hgjHRAgEBf2CCMcmhDoEB…",
  "dg13": "bYIBmzCCAZcCAQEGBijTFgEACDGC…",
  "dg14": "boIBfjGCAXowDQYIBAB/AAcCAgIC…",
  "dg15": "b4IBJjCCASIwDQYJKoZIhvcNAQEB…",
  "document_id": "001xxxxxxxxx",
  "ref_id": "ref_00000001"
}

Parameters:

ParamTypeRequiredDefaultDescription
sodstringYes—Document Security Object extracted from the NFC chip. Base64.
dg1stringYes—Data group 1 — the MRZ. Extracted from the NFC chip. Base64.
dg2stringYes—Data group 2 — the facial image. Extracted from the NFC chip. Base64.
dg13stringYes—Data group 13 — additional personal details. Extracted from the NFC chip. Base64.
dg14stringYes—Data group 14 — security options for chip authentication. Extracted from the NFC chip. Base64.
dg15stringYes—Data group 15 — the active authentication public key. Extracted from the NFC chip. Base64.
document_idstringYes—NID number of the person whose chip is being verified.
ref_idstringYes—The transaction reference ID from Create Transaction.

Returns: ReadNfcResponse

Authenticate this call with the JWT token from Create Transaction, as Authorization: Bearer {token} — not with HMAC.

Sample Request ​

bash
curl --location '<BASE_URL>/v1/read_nfc' \
  --header 'Authorization: Bearer <JWT_TOKEN>' \
  --header 'X-TV-Timestamp: <TIMESTAMP>' \
  --header 'Content-Type: application/json' \
  --data '{
    "sod": "d4IG/TCCBvkGCSqGSIb3DQEHAqCC…",
    "dg1": "YV1fH1pJRFZOTTAwMXh4eHh4eHh4eA…",
    "dg2": "dYIx1n9hgjHRAgEBf2CCMcmhDoEB…",
    "dg13": "bYIBmzCCAZcCAQEGBijTFgEACDGC…",
    "dg14": "boIBfjGCAXowDQYIBAB/AAcCAgIC…",
    "dg15": "b4IBJjCCASIwDQYJKoZIhvcNAQEB…",
    "document_id": "001xxxxxxxxx",
    "ref_id": "ref_00000001"
  }'

Response ​

json
{
  "success": true,
  "code": 0,
  "message": "success",
  "request_id": "request_id",
  "data": {
    "citizen_identify": "001xxxxxxxxx",
    "old_citizen_identify": "xxxxxxxxx",
    "full_name": "Nguyễn Văn A",
    "date_of_birth": "12/12/1990",
    "date_of_expiry": "12/12/2030",
    "gender": "Nam",
    "nationality": "Việt Nam",
    "ethnic": "Kinh",
    "religion": "Không",
    "place_of_origin": "Xã An Khánh, Huyện Châu Thành, Tỉnh Bến Tre",
    "place_of_residence": "Tổ 1, Phường Bến Nghé, Quận 1, TP. Hồ Chí Minh",
    "personal_identification": "Sẹo chấm cách 1cm trên đuôi mày trái",
    "date_provide": "01/01/2021",
    "father_name": "Nguyễn Văn B",
    "mother_name": "Trần Thị C",
    "partner_name": "",
    "face_image": "/9j/4AAQSkZJRgABAQA…",
    "is_verified": true,
    "verification_key": "<VERIFICATION_KEY>"
  }
}

NFCData ​

FieldTypeDescription
citizen_identifystringThe 12-digit NID number.
old_citizen_identifystringThe legacy 9-digit CMND number, when the citizen previously held one.
full_namestringFull legal name of the cardholder.
date_of_birthstringDate of birth, DD/MM/YYYY.
date_of_expirystringCard expiry date, DD/MM/YYYY.
genderstringNam (male) or Nữ (female).
nationalitystringNationality, e.g. Việt Nam.
ethnicstringEthnicity, e.g. Kinh.
religionstringReligion, e.g. Không (none).
place_of_originstringQuê quán — the citizen's registered birthplace.
place_of_residencestringRegistered permanent residence address.
personal_identificationstringDistinguishing physical characteristics printed on the card.
date_providestringCard issue date, DD/MM/YYYY.
father_namestringFather's full name.
mother_namestringMother's full name.
partner_namestringSpouse's full name, empty when not recorded.
face_imagestringBase64-encoded JPEG portrait read from DG2.
is_verifiedboolWhether the chip data passed the read-time integrity check.
verification_keystringKey your backend passes to Verify NFC. Max length 128.

WARNING

The is_verified returned here reflects the chip read only, not a C06 check. Do not approve an onboarding on this value — the SDK is running on a device you do not control. Complete the flow with Verify NFC and decide on that server-side result.

Errors ​

CodeDescription
2001002internal_bad_gateway
2001019Transaction not found.
2001020Transaction lock failed.
2001021Invalid transaction request.
2001022Transaction already verified.
2001027Token invalid.
2001030Invalid document id.
4001000Input parameter violates a constraint.
4291000The number of requests exceeded throughput limit.
5001000internal_server_error
CodeDescription
401You are not authorized to perform the action.
500Some unexpected error occurs while processing the request.

Next Steps ​

  • Verify NFC — turn the verification_key into a C06-backed verdict
  • NID Field Definitions — formats, validation rules and normalization for every field above

Developers