Cek KTP
Verifikasi NIK, nama, tanggal lahir, dan foto KTP.
Base URL
https://use.api.co.id
Kirim nik, name, date_of_birth, foto KTP (identity), dan optional selfie ke POST /id-verification/verify sebagai multipart/form-data dengan header x-api-co-id. Response berisi result (verified atau rejected), message provider, dan optional reject_reason.
Jangan log NIK, nama, token, file image, atau payload base64.
Field request
| Field | Wajib | Aturan |
|---|---|---|
nik | ya | 16 digit |
name | ya | Nama sesuai identitas |
date_of_birth | ya | Format DD-MM-YYYY |
identity | ya | Foto KTP JPG/JPEG/PNG, maks 5 MB |
selfie | tidak | Foto selfie JPG/JPEG/PNG, maks 5 MB |
curl -X POST "https://use.api.co.id/id-verification/verify" \
-H "x-api-co-id: YOUR_API_KEY" \
-F "nik=1203122810970002" \
-F "name=User Info" \
-F "date_of_birth=01-10-1990" \
-F "identity=@/absolute/path/to/ktp.jpg" \
-F "selfie=@/absolute/path/to/selfie.jpg"
Field server-side
reference_numbertidak perlu dikirim. API.CO.ID membuatnya otomatis dan mengembalikannya di response.- Jika provider membutuhkan email atau phone, API.CO.ID memakai email akun dan nomor telepon dari KYC approved.
- Jika
selfiedikirim, API.CO.ID meneruskannya ke provider dan response provider dikembalikan apa adanya. Jika tidak dikirim, API.CO.ID memakai fallback selfie internal untuk menjaga kompatibilitas request lama.
Hasil
Verified:
{
"is_success": true,
"message": "Success",
"data": {
"reference_number": "REF-20260725-0001",
"channel_id": "001",
"result": "verified",
"message": "digital certificate has been issued"
}
}
Rejected:
{
"is_success": true,
"message": "Success",
"data": {
"reference_number": "REF-20260725-0002",
"channel_id": "001",
"result": "rejected",
"message": "identity did not match",
"reject_reason": {
"code": "ID_MISMATCH",
"reason": "identity mismatch"
}
}
}
result: rejected tetap return HTTP 200 karena provider berhasil memproses verifikasi, hanya hasil match-nya tidak lolos. Ini dianggap request sukses secara bisnis.
Akses & billing
API.CO.ID memeriksa akses dengan urutan:
- API key valid.
- Saldo/subscription cukup untuk
id-verification. - eKYC customer sudah approved.
- Request diteruskan ke provider.
- Points dipotong hanya jika provider memproses request.
Error umum
| HTTP | Kondisi |
|---|---|
| 400Bad Request | File KTP hilang, tipe file tidak didukung, atau ukuran file lebih dari 5 MB |
| 401Unauthorized | API key hilang atau salah |
| 402Payment Required | Saldo/subscription belum cukup |
| 403Forbidden | eKYC belum approved, pending, rejected, atau expired |
| 422Unprocessable | Format NIK, DOB, email akun, nomor telepon KYC, atau field lain tidak valid |
| 500Server Error | Channel provider misconfigured |
| 502Bad Gateway | Provider auth/server/response error |
| 504Gateway Timeout | Provider timeout |
Verify KTP identity
Matches NIK, name, date of birth, an identity document, and optionally the user's selfie. When selfie is provided, API.CO.ID forwards that selfie to the provider and returns the processed provider response without overriding the business result. When selfie is omitted, API.CO.ID uses an internal fallback selfie for backward compatibility. A rejected identity match is returned as a processed business response with result: rejected. Do not log NIK or image/base64 data.
| Nama | Tipe | Keterangan |
|---|---|---|
nikWajib | string | 16 digit Indonesian identity number Contoh: 1203122810970002 |
nameWajib | string | Contoh: User Info |
date_of_birthWajib | string | Date of birth in DD-MM-YYYY format Contoh: 01-10-1990 |
identityWajib | file | Identity document image in JPG, JPEG, or PNG format; maximum 5 MB |
selfieOpsional | file | Optional selfie image in JPG, JPEG, or PNG format; maximum 5 MB. If provided, API.CO.ID forwards this image to the provider and does not override the provider business result. |
| Nama | Tipe | Keterangan |
|---|---|---|
is_successWajib | boolean | Contoh: true |
messageWajib | string | Contoh: Success |
dataWajib | object | |
data.reference_numberWajib | string | |
data.channel_idWajib | string | Contoh: 001 |
data.resultWajib | string | Nilai: verifiedrejected |
data.messageOpsional | string | |
data.reject_reasonOpsional | object | |
data.reject_reason.codeOpsional | string | |
data.reject_reason.reasonOpsional | string |
curl -X POST "https://use.api.co.id/id-verification/verify" \ -H "x-api-co-id: $API_CO_ID_KEY" \ -F "nik=1203122810970002" \ -F "name=User Info" \ -F "date_of_birth=01-10-1990" \ -F "[email protected]" \ -F "[email protected]"{ "is_success": true, "message": "Success", "data": { "reference_number": "REF-20260714-0001", "channel_id": "001", "result": "verified", "message": "digital certificate has been issued" }}