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.

KTP

Request
{
  "operations": ["ocr"],
  "payload": {
    "partnerTrxId": "random-uuid",
    "groupId": "random-uuid",
    "idType": "ID_CARD",
    "country": "IDN",
    "idSubtype": "KTP",
    "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": {
        "blurriness": {
            "score": 0.001487,
            "threshold": 0.95
        },
        "lowLight": {
            "score": 0.547791,
            "threshold": 0.95
        },
        "overExposure": {
            "score": 0.600573,
            "threshold": 0.95
        },
        "cardDimension": {
            "card_coordinates": {
                "x1": 186,
                "x2": 1778,
                "y1": 376,
                "y2": 1339
            },
            "card_width": 1592,
            "card_height": 963
        }
    },
    "card": {
        "country": "INDONESIA",
        "type": "KTP",
        "isoAlpha3CountryCode": "IDN",
        "isoAlpha2CountryCode": "ID"
    },
    "idVerificationResult": {
        "spoofingResult": {
            "message": "Success",
            "code": 5000,
            "recapScore": {
                "score": 0.545752,
                "threshold": 0.95
            },
            "blackWhite": {
                "score": 0.034161,
                "threshold": 0.95
            },
            "colorPrint": {
                "score": 0.492669,
                "threshold": 0.95
            },
            "screenshot": {
                "score": 0.073531,
                "threshold": 0.95
            }
        },
        "landmarkResult": {
            "code": 5000,
            "message": "Success",
            "threshold": 0.95,
            "containerResult": [
                {
                    "position": {
                        "x": 568,
                        "y": 26,
                        "width": 233,
                        "height": 41
                    },
                    "name": "provinsi",
                    "score": 0.9915
                },
                {
                    "position": {
                        "x": 101,
                        "y": 131,
                        "width": 113,
                        "height": 45
                    },
                    "name": "nik",
                    "score": 0.992
                },
                {
                    "position": {
                        "x": 91,
                        "y": 217,
                        "width": 112,
                        "height": 35
                    },
                    "name": "nama",
                    "score": 0.9921
                },
                {
                    "position": {
                        "x": 86,
                        "y": 258,
                        "width": 328,
                        "height": 37
                    },
                    "name": "tampat-tgl-lahir",
                    "score": 0.9905
                },
                {
                    "position": {
                        "x": 78,
                        "y": 302,
                        "width": 259,
                        "height": 34
                    },
                    "name": "jenis-kelamin",
                    "score": 0.9925
                },
                {
                    "position": {
                        "x": 77,
                        "y": 345,
                        "width": 140,
                        "height": 33
                    },
                    "name": "alamat",
                    "score": 0.9913
                },
                {
                    "position": {
                        "x": 168,
                        "y": 390,
                        "width": 143,
                        "height": 33
                    },
                    "name": "rt-rw",
                    "score": 0.9908
                },
                {
                    "position": {
                        "x": 165,
                        "y": 434,
                        "width": 174,
                        "height": 35
                    },
                    "name": "kel-desa",
                    "score": 0.9907
                },
                {
                    "position": {
                        "x": 160,
                        "y": 479,
                        "width": 228,
                        "height": 35
                    },
                    "name": "kecamatan",
                    "score": 0.993
                },
                {
                    "position": {
                        "x": 64,
                        "y": 522,
                        "width": 137,
                        "height": 33
                    },
                    "name": "agama",
                    "score": 0.9878
                },
                {
                    "position": {
                        "x": 62,
                        "y": 568,
                        "width": 373,
                        "height": 39
                    },
                    "name": "status-perkawinan",
                    "score": 0.9903
                },
                {
                    "position": {
                        "x": 54,
                        "y": 613,
                        "width": 206,
                        "height": 36
                    },
                    "name": "pekerjaan",
                    "score": 0.9903
                },
                {
                    "position": {
                        "x": 52,
                        "y": 659,
                        "width": 375,
                        "height": 39
                    },
                    "name": "kewarganegaraan",
                    "score": 0.9918
                },
                {
                    "position": {
                        "x": 51,
                        "y": 705,
                        "width": 303,
                        "height": 38
                    },
                    "name": "berlaku-hingga",
                    "score": 0.9915
                },
                {
                    "position": {
                        "x": 815,
                        "y": 319,
                        "width": 199,
                        "height": 34
                    },
                    "name": "gol-darah",
                    "score": 0.9913
                },
                {
                    "position": {
                        "x": 1161,
                        "y": 140,
                        "width": 367,
                        "height": 485
                    },
                    "name": "portrait",
                    "score": 0.9967
                }
            ],
            "landmarkTags": [
                {
                    "name": "portrait_background_color",
                    "value": "red"
                }
            ],
            "landmarkVerification": [
                {
                    "name": "heuristic_check",
                    "status": "pass"
                }
            ]
        },
        "forgeryResult": {
            "code": 5000,
            "message": "Success",
            "summary": {
                "score": 0.02,
                "threshold": 0.95
            }
        }
    }
}

Forged Card Response

HTTP Status Code: 400

Forged Card 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",
  "errors": [
        {
            "message": "The card appears to be forged.",
            "code": 5024,
            "operations": [
                "idVerification"
            ]
        }
    ],
  "imageQualityResult": {
        "blurriness": {
            "score": 0.001487,
            "threshold": 0.95
        },
        "lowLight": {
            "score": 0.547791,
            "threshold": 0.95
        },
        "overExposure": {
            "score": 0.600573,
            "threshold": 0.95
        },
        "cardDimension": {
            "card_coordinates": {
                "x1": 186,
                "x2": 1778,
                "y1": 376,
                "y2": 1339
            },
            "card_width": 1592,
            "card_height": 963
        }
    }
}

Landmark Warning Response

HTTP Status Code: 200

Landmark Warning JSON Response

Spoof Warning Response

Note: This happens when 1 spoof check fails.

HTTP Status Code: 200

Spoof Warning JSON Response

Spoof Error Response

Note: This happens when more than 1 spoof check fails.

HTTP Status Code: 400

Spoof Error JSON Response

Last updated