> For the complete documentation index, see [llms.txt](https://docs.vida.id/identity-stack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vida.id/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/summary-endpoint/id-verification/malaysian-cards.md).

# Malaysian Cards

Currently Supported Malaysian Cards include:

1. [MyKad](#mykad)
2. [MyTentera](#mytentera)
3. [MyKas](#mykas)
4. [MyPR](#mypr)

{% hint style="info" %}
**Note:** Currently, **forgery models** are only available for **MyKad** cards. As a result, only **MyKad cards** will have the forgery checks performed on them, while other card types—such as **MyTentera, MyKas, and MyPR**—will **not** have forgery checks performed on them.
{% endhint %}

## MyKad

### Request

<details>

<summary>Request</summary>

```json
{
  "operations": ["idVerification"],
  "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"
  }
}
```

</details>

### Success Response

HTTP Status Code: `200`

<details>

<summary>Success JSON Response</summary>

```json
{
  "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"
  },
  "idVerificationResult": {
    "statusCode": 5000
  }
}
```

</details>

### Forged Card Response

HTTP Status Code: `400`&#x20;

<details>

<summary>Forged Card JSON Response</summary>

```json
{
  "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",
  "errors": [
      {
        "message": "The card appears to be forged.",
        "code": 5024,
        "operations": [
            "idVerification"
        ]
      }
  ],
  "imageQualityResult": {
      "statusCode": 5000
  }
}
```

</details>

### IDV Failure On Spoof or Landmark Response

HTTP Status Code: `400`&#x20;

<details>

<summary>IDV Failure On Spoof Or Landmark JSON Response</summary>

```json
{
  "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",
  "errors": [
      {
        "message": "The card failed the idVerification",
        "code": 5025,
        "operations": [
            "idVerification"
        ]
      }
  ],
  "imageQualityResult": {
      "statusCode": 5000
  }
}
```

</details>

## MyTentera

{% hint style="info" %}
**Note:** There are **two versions** of **MyTentera** cards: an **old version** and a **new version**. The **old version** does not have a **ghost image**.

The **ghost image** is considered an **optional landmark**—if detected, it will be included in the response; otherwise, it will be omitted **without triggering any warnings**.
{% endhint %}

### Request

<details>

<summary>Request</summary>

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

</details>

### Success Response

HTTP Status Code: `200`&#x20;

<details>

<summary>Success JSON Response</summary>

```json
{
  "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": "MyTentera",
     "isoAlpha3CountryCode": "MYS",
     "isoAlpha2CountryCode": "MY"
  },
  "idVerificationResult": {
    "statusCode": 5000
  }
}
```

</details>

### IDV Failure On Spoof or Landmark Response

HTTP Status Code: `400`&#x20;

<details>

<summary>IDV Failure On Spoof or Landmark JSON Response</summary>

```json
{
  "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",
  "errors": [
      {
        "message": "The card failed the idVerification",
        "code": 5025,
        "operations": [
            "idVerification"
        ]
      }
  ],
  "imageQualityResult": {
      "statusCode": 5000
  }
}
```

</details>

## MyKas

### Request

<details>

<summary>Request</summary>

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

</details>

### Success Response

HTTP Status Code: `200`&#x20;

<details>

<summary>Success JSON Response</summary>

```json
{
  "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": "MyKas",
     "isoAlpha3CountryCode": "MYS",
     "isoAlpha2CountryCode": "MY"
  },
  "idVerificationResult": {
    "statusCode": 5000
  }
}
```

</details>

### IDV Failure On Spoof or Landmark Response

HTTP Status Code: `400`&#x20;

<details>

<summary>IDV Failure On Spoof or Landmark JSON Response</summary>

```json
{
  "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",
  "errors": [
      {
        "message": "The card failed the idVerification",
        "code": 5025,
        "operations": [
            "idVerification"
        ]
      }
  ],
  "imageQualityResult": {
      "statusCode": 5000
  }
}
```

</details>

## MyPR

### Request

<details>

<summary>Request</summary>

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

</details>

### Success Response

HTTP Status Code: `200`&#x20;

<details>

<summary>Success JSON Response</summary>

```json
{
  "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": "MyPR",
     "isoAlpha3CountryCode": "MYS",
     "isoAlpha2CountryCode": "MY"
  },
  "idVerificationResult": {
    "statusCode": 5000
  }
}
```

</details>

### IDV Failure On Spoof or Landmark Response

HTTP Status Code: `400`&#x20;

<details>

<summary>IDV Failure On Spoof or Landmark JSON Response</summary>

```json
{
  "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",
  "errors": [
      {
        "message": "The card failed the idVerification",
        "code": 5025,
        "operations": [
            "idVerification"
        ]
      }
  ],
  "imageQualityResult": {
      "statusCode": 5000
  }
}
```

</details>
