Introducing VIDA Identity Stack: All of VIDA, in one place 🎉
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Malaysian Cards

Currently Supported Malaysian Cards include:

Note: The RELIGION field is optional on Malaysian ID cards, meaning it may or may not be printed on the card. As a result, this field may also be present or absent in the response.

MyKad

Request

Request
{
  "operations": ["ocr"],
  "payload": {
    "partnerTrxId": "random-uuid",
    "groupId": "random-uuid",
    "idType": "ID_CARD",
    "country": "MYS",
    "idSubtype": "MyKad",
    "idFrontSideImage": "Base64 encoded image of ID front side"
  },
  "userConsent": {
    "userIP": "0.0.0.0",
    "country": "MYS",
    "obtained": true,
    "obtainedAt": "1680700959"
  }
}

Success Response

HTTP Status Code: 200

Success JSON Response
{
  "transactionId": "unique transaction id generated to identify this transaction",
  "partnerTrxId": "partner transaction id submitted by customer in request",
  "groupId": "partner group id submitted by customer in request",
  "imageQualityResult": {
      "statusCode": 5000
  },
  "card":{
     "country": "MALAYSIA",
     "type": "MyKad",
     "isoAlpha3CountryCode": "MYS",
     "isoAlpha2CountryCode": "MY"
  },
  "ocrResult": {
     "idNumber": "Id Number from the card",
     "name": "Name from id card",
     "address": "Address from id card",
     "dob": "Date of birth in YYYYMMDD format",
     "citizenship": "Citizenship from id card",
     "gender": "Gender from id card (M/F/O)",
     "religion": "Religion from id card",
     "address1": "address1",
     "address2": "address2",
     "zipCode": "Zip Code",
     "city": "City",
     "state": "State"
  }
}

IdNumber with '*' at the end

Note: Some MyKad cards have an * at the end of the ID number. This asterisk indicates that the ID number does not match the cardholder’s date of birth. Instead, the first six digits, which typically represent the date of birth, correspond to the date of application for the MyKad.

HTTP Status Code: 200

IdNumber with '*' - JSON Response

Error 5023 - IdNumber Doesn't contain a valid DOB

Note: In some cases, glare or other obstructions on MyKad cards may prevent proper extraction of the ID number, which in turn affects the extraction of the date of birth. If the ID number is occluded or not extracted correctly, the following error message will be returned.

HTTP Status Code: 400

Error 5023 - JSON Response

Error 5026 - Extraction failed for the below ocr field. Please make sure the fields are properly visible on the card.

Note: This error is raised only for the critical fields of MyKad cards. For other fields, no error will be thrown; instead, the response will contain EXTRACTION_ERROR.

Critical Fields for MyKad cards are:

  1. IdNumber

  2. Name

  3. DOB

  4. Address

HTTP Status Code: 400

Error 5026 - Critical field extraction failed

HTTP Status Code: 200

Success response - Extraction failed only for non critical field

MyTentera

Request

Request

Success Response

HTTP Status Code: 200

Success JSON Response

Error 5023 - IdNumber Doesn't contain a valid DOB

Note: In some cases, glare or other obstructions on MyTentera cards may prevent proper extraction of the ID number, which in turn affects the extraction of the date of birth. If the ID number is occluded or not extracted correctly, the following error message will be returned.

HTTP Status Code: 400

Error 5023 - JSON Response

Error 5026 - Extraction failed for the below ocr field. Please make sure the fields are properly visible on the card.

Note: This error is raised only for the critical fields of MyTentera cards. For other fields, no error will be thrown; instead, the response will contain EXTRACTION_ERROR.

Critical Fields for MyTentera cards are:

  1. IdNumber

  2. Name

  3. DOB

  4. Address

HTTP Status Code: 400

Error 5026 - Critical field extraction failed

HTTP Status Code: 200

Success response - Extraction failed only for non critical field

MyKas

Request

Request

Success Response

HTTP Status Code: 200

Success JSON Response

Error 5023 - IdNumber Doesn't contain a valid DOB

Note: In some cases, glare or other obstructions on MyKas cards may prevent proper extraction of the ID number, which in turn affects the extraction of the date of birth. If the ID number is occluded or not extracted correctly, the following error message will be returned.

HTTP Status Code: 400

Error 5203 - JSON Response

Error 5026 - Extraction failed for the below ocr field. Please make sure the fields are properly visible on the card.

Note: This error is raised only for the critical fields of MyKas cards. For other fields, no error will be thrown; instead, the response will contain EXTRACTION_ERROR.

Critical Fields for MyKas cards are:

  1. IdNumber

  2. Name

  3. DOB

  4. Address

HTTP Status Code: 400

Error 5026 - Critical field extraction failed

HTTP Status Code: 200

Success response - Extraction failed only for non critical field

MyPR

Request

Request

Success Response

HTTP Status Code: 200

Success JSON Response

Error 5023 - IdNumber Doesn't contain a valid DOB

Note: In some cases, glare or other obstructions on MyPR cards may prevent proper extraction of the ID number, which in turn affects the extraction of the date of birth. If the ID number is occluded or not extracted correctly, the following error message will be returned.

HTTP Status Code: 400

Error 5023 - JSON Response

Error 5026 - Extraction failed for the below ocr field. Please make sure the fields are properly visible on the card.

Note: This error is raised only for the critical fields of MyPR cards. For other fields, no error will be thrown; instead, the response will contain EXTRACTION_ERROR.

Critical Fields for MyPR cards are:

  1. IdNumber

  2. Name

  3. DOB

  4. Address

HTTP Status Code: 400

Error 5026 - Critical field extraction failed

HTTP Status Code: 200

Success response - Extraction failed only for non critical field

Last updated