Method Endpoint POST https://api.verihubs.com/data-verification/certificate-electronic/verify
Key
Type
Description
App-ID
String
Application ID that generated from Application Menu in Verihubs Client Dashboard.
To hit in Testing and Live mode you need a Production Application ID.
API-Key
String
API-Key that generated from Application Menu in Verihubs Client Dashboard that related to specific Application ID.
You can generate your Application ID and API-Key in the Application page in Verihubs Client Dashboard. .
Parameter
Type
Description
Validation
Example
nik
String
Nomor Induk Kependudukan as stated on the KTP.
Must be 16 digits
Numeric only
Can not start with 0
Can not have four consecutive numbers
9171022512990011
name
String
Full name as stated on the KTP.
Alphabet [a-z][A-Z]
Dot (.)
Comma (,)
Single quote (')
Slash (/)
Dash (-)
birth_date
String
Birth date as stated on the KTP.
Must be in DD-MM-YYYY format
Minimum 17 years old counted from the current date to the birth date inputted.
01-01-1901
email
String
Email address that must be unique per NIK.
Must be email format (@)
Must be unique per NIK for Certificate Electronic generation.
[email protected]
phone
String
Phone number that must be unique per NIK.
Use country code
Must be a valid phone number
6281277863450
selfie_photo
String
The same face that registered as the owner of the KTP
Format base64
Minimum size 100 KB
Maximum size 4 MB
Minimum pixel 480 x 640 px
Maximum pixel 10.000 x 10.000 px
Base64
ktp_photo
String
A full pyshical/digital KTP photo
Format base64
Minimum size 100 KB
Maximum size 2 MB
Minimum pixel 480 x 360 px
Base64
reference_id
String
A user inputted unique id to refer to a certain transaction
This reference_id can be used to indicate your company’s transaction and must be unique.
If the reference_id is not inputted, then Verihubs will generate one for you
SERTEL_123
HTTP Code
Description
200
Successful Transaction; Transaction that is considered successful and has been successfully verified by the data source.
400
Invalid Payload; Transaction that is considered failed due to validation errors, an error_field will appear explaining the error.
Access Timeout from Datasource; The transaction
401
Authorization Failed; Possible reason:
Sandbox App ID and/or API Key used in Production mode transaction.
Unmatch App ID and API Key.
403
Forbidden; The transaction is in Testing mode and not enough remaining quota. Possible reason:
Electronic Certificate quota
Liveness-Sertel quota
429
Too Many Request; Spam Error as the transaction is read as spam, please wait a 10 seconds before re-performing the hit process.
500
Internal Server Error in Datasource; The transaction failed due to server error in datasource.
Internal Server Error; The transaction failed due to server error in Verihubs.
The reject field indicates if a parameter is returned incorrectly after being checked from the data source side.
HTTP Code reject_field Definition 200 nik NIK not found in the data source. 200 name Name not match to the full name registered in the datasource. 200 birth_date Birth date not match to the birth date registered in the datasource. 200 selfie_photo Selfie not match with the face registered in the datasource. 200 phone Phone conflict/already used to other NIK. 200 email Email conflict/already used to other NIK. 200 liveness_check Face exist in photo but not alive.
This case occurs if all parameters get successful results from the results of checking the data source (all valid data).
Request
Response
Remarks
JSON
{
"nik": "VALID_NIK",
"name": "VALID_NAME",
"birth_date": "VALID_BIRTH_DATE",
"email": "VALID_EMAIL",
"phone": "VALID_PHONE",
"selfie_photo": "base64 format",
"ktp_photo": "base64 format",
"reference_id": ""
}
JSON
{
"message": "Certificate electronic verification has been done",
"data": {
"id": "8e31a91c-7437-4ed1-b086-06cbe247d6e7",
"status": "verified",
"reject_field": [],
"reference_id": "ref_certel#e87c8bc2-5d10-455b-98a0-187d60f72873"
}
}
Successfull transaction
This is a response that indicates there is an incorrect parameter after checking the data source. Below are also some examples of requests/responses.
Request
Response
Remarks
JSON
{
"nik": "VALID_NIK",
"name": "VALID_NAME",
"birth_date": "VALID_BIRTH_DATE",
"email": "VALID_EMAIL",
"phone": "VALID_PHONE",
"selfie_photo": "base64 format",
"ktp_photo": "base64 format",
"reference_id": ""
}
JSON
{
"message": "Certificate electronic verification has been done",
"data": {
"id": "8e31a91c-7437-4ed1-b086-06cbe247d6e7",
"status": "not_verified",
"reject_field": ["nik"],
"reference_id": "ref_certel#e87c8bc2-5d10-455b-98a0-187d60f72873"
}
}
Success (not_verified)
Note: The transaction has been successfully checked against the data source and obtained some parameters with a value of 'false' which can be seen through the reject_field in the response
Request
Response
Remarks
JSON
{
"nik":"VALID_NIK",
"name":"NAME_AS_ON_KT",
"birth_date":"VALID_BIRTH_DATE",
"email":"VALID_EMAIL",
"phone":"VALID_PHONE",
"selfie_photo":"base64 format”,
"ktp_photo":"base64 format”,
"channel":"VALID_CHANNEL",
"reference_id":””,
}
JSON
{
"message": "Certificate electronic verification has been done",
"data": {
"id": "8e31a91c-7437-4ed1-b086-06cbe247d6e7",
"status": "not_verified",
"reject_field": ["name"],
"reference_id": "ref_certel#e87c8bc2-5d10-455b-98a0-187d60f72873"
}
}
Success (not_verified)
Note:
The transaction has been successfully checked against the data source and obtained some parameters with a value of 'false' which can be seen through the reject_field in the response
Request
Response
Remarks
JSON
{
"nik":"VALID_NIK",
"name":"VALID_NAME",
"birth_date":"BIRTH_DATE_AS_ON_KTP",
"email":"VALID_EMAIL",
"phone":"VALID_PHONE",
"selfie_photo":"base64 format”,
"ktp_photo":"base64 format”,
"channel":"VALID_CHANNEL",
"reference_id":””,
}
JSON
{
"message": "Certificate electronic verification has been done",
"data": {
"id": "8e31a91c-7437-4ed1-b086-06cbe247d6e7",
"status": "not_verified",
"reject_field": ["birth_date"],
"reference_id": "ref_certel#e87c8bc2-5d10-455b-98a0-187d60f72873"
}
}
Success (not_verified)
Note: The transaction has been successfully checked against the data source and obtained some parameters with a value of 'false' which can be seen through the reject_field in the response
Request
Response
Remarks
JSON
{
"nik":"VALID_NIK",
"name":"VALID_NAME",
"birth_date":"VALID_BIRTH_DATE",
"email":"VALID_EMAIL",
"phone":"VALID_PHONE",
"selfie_photo":"SELFIE_PHOTO”,
"ktp_photo":"base64 format”,
"channel":"VALID_CHANNEL",
"reference_id":””,
}
JSON
{
"message": "Certificate electronic verification has been done",
"data": {
"id": "8e31a91c-7437-4ed1-b086-06cbe247d6e7",
"status": "not_verified",
"reject_field": ["selfie_photo"],
"reference_id": "ref_certel#e87c8bc2-5d10-455b-98a0-187d60f72873"
}
}
Success (not_verified)
Note: The transaction has been successfully checked against the data source and obtained some parameters with a value of 'false' which can be seen through the reject_field in the response
This case occurs where email, phone, or both have been correlated with a certain NIK, causing the status "verified_with_reason". If this case occurs, please contact Privy's customer support directly ([email protected] ).
Request
Response
Remarks
JSON
{
"nik":"VALID_NIK",
"name":"VALID_NAME",
"birth_date":"VALID_BIRTH_DATE",
"email":"CONFLICT_EMAIL",
"phone":"VALID_PHONE",
"selfie_photo":"base64 format”,
"ktp_photo":"base64 format”,
"reference_id":””,
}
JSON
{
"message": "Certificate electronic verification has been done",
"data": {
"id": "8e31a91c-7437-4ed1-b086-06cbe247d6e7",
"status": "verified_with_reason",
"reject_field": ["email"],
"reference_id": "ref_certel#e87c8bc2-5d10-455b-98a0-187d60f72873"
}
}
Email has been used by another NIK.
Request
Response
Remarks
JSON
{
"nik":"VALID_NIK",
"name":"VALID_NAME",
"birth_date":"VALID_BIRTH_DATE",
"email":"VALID_EMAIL",
"phone":"CONFLICT_PHONE",
"selfie_photo":"base64 format”,
"ktp_photo":"base64 format”,
"reference_id":””,
}
JSON
{
"message": "Certificate electronic verification has been done",
"data": {
"id": "8e31a91c-7437-4ed1-b086-06cbe247d6e7",
"status": "verified_with_reason",
"reject_field": ["email"],
"reference_id": "ref_certel#e87c8bc2-5d10-455b-98a0-187d60f72873"
}
}
Phone has been used by another NIK
Request
Response
Remarks
JSON
{
"nik":"VALID_NIK",
"name":"VALID_NAME",
"birth_date":"VALID_BIRTH_DATE",
"email":"CONFLICT_EMAIL",
"phone":"CONFLICT_PHONE",
"selfie_photo":"base64 format”,
"ktp_photo":"base64 format”,
"reference_id":””,
}
JSON
{
"message": "Certificate electronic verification has been done",
"data": {
"id": "8e31a91c-7437-4ed1-b086-06cbe247d6e7",
"status": "verified_with_reason",
"reject_field": ["email","phone"],
"reference_id": "ref_certel#e87c8bc2-5d10-455b-98a0-187d60f72873"
}
}
Phone and email has been used by another NIK
Failed transaction has two main reasons:
Parameter validation
Error in datasource.
NIK Digit Validation
Request
Response
Remarks
JSON
{
"nik":"INVALID_FORMAT_NIK",
"name":"VALID_NAME",
"birth_date":"VALID_BIRTH_DATE",
"email":"VALID_EMAIL",
"phone":"VALID_PHONE",
"selfie_photo":"base64 format”,
"ktp_photo":"base64 format”,
"reference_id":””,
}
JSON
{
"error_code": "INVALID_PAYLOAD",
"error_fields": [
{
"field": "nik",
"message": "nik length should consist of 16 digit(s)"
}
],
"message": "Invalid payload"
}
HTTP 400
NIK is not exact 16 digits.
NIK Pattern Validation:
Request
Response
Remarks
JSON
{
"nik":"INVALID_PATTERN_NIK",
"name":"VALID_NAME",
"birth_date":"VALID_BIRTH_DATE",
"email":"VALID_EMAIL",
"phone":"VALID_PHONE",
"selfie_photo":"base64 format”,
"ktp_photo":"base64 format”,
"reference_id":””,
}
JSON
{
"error_code": "INVALID_PAYLOAD",
"error_fields": [
{
"field": "nik",
"message": "nik value is invalid"
}
],
"message": "Invalid payload"
}
HTTP 400
NIK start from 0
NIK has 5 consecutive digits (ex: 12345)
Request
Response
Remarks
JSON
{
"nik":"VALID_NIK",
"name":"VALID_NAME",
"birth_date":"INVALID_FORMAT_BIRTH_DATE",
"email":"VALID_EMAIL",
"phone":"VALID_PHONE",
"selfie_photo":"base64 format”,
"ktp_photo":"base64 format”,
"reference_id":””,
}
Transaction error
Note: The transaction was not processed and received a code 400 due to a validation error
Request
Response
Remarks
JSON
{
"nik":"VALID_NIK",
"name":"VALID_NAME",
"birth_date":"VALID_BIRTH_DATE",
"email":"VALID_EMAIL",
"phone":"VALID_PHONE",
"selfie_photo":"INVALID_FORMAT_SELFIE_PHOTO”,
"ktp_photo":"base64 format”,
"reference_id":””,
}
Transaction error
Note: The transaction was not processed and received a code 400 due to a validation error
Request
Response
Remarks
JSON
{
"nik":"VALID_NIK",
"name":"VALID_NAME",
"birth_date":"VALID_BIRTH_DATE",
"email":"VALID_EMAIL",
"phone":"VALID_PHONE",
"selfie_photo":"INVALID_FORMAT_SELFIE_PHOTO_NO_FACE”,
"ktp_photo":"base64 format”,
"reference_id":””,
}
Transaction error
Note: The transaction was not processed and received a code 400 due to validation error
Request
Response
Remarks
JSON
{
"nik":"VALID_NIK",
"name":"VALID_NAME",
"birth_date":"VALID_BIRTH_DATE",
"email":"VALID_EMAIL",
"phone":"VALID_PHONE",
"selfie_photo":"base64 format”,
"ktp_photo":"INVALID_FORMAT_KTP_PHOTO”,
"reference_id":””,
}
Transaction error
Note: The transaction was not processed and received a code 400 due to validation error
Request
Response
Remarks
JSON
{
"nik":"VALID_NIK",
"name":"VALID_NAME",
"birth_date":"VALID_BIRTH_DATE",
"email":"INVALID_FORMAT_EMAIL",
"phone":"VALID_PHONE",
"selfie_photo":"base64 format”,
"ktp_photo":"base64 format”,
"reference_id":””,
}
Transaction error
Note: The transaction was not processed and received a code 400 due to validation error
Request
Response
Remarks
JSON
{
"nik":"VALID_NIK",
"name":"VALID_NAME",
"birth_date":"VALID_BIRTH_DATE",
"email":"VALID_EMAIL",
"phone":"INVALID_FORMAT_PHONE",
"selfie_photo":"base64 format”,
"ktp_photo":"base64 format”,
"reference_id":””,
}
Transaction error
Note: The transaction was not processed and received a code 400 due to validation error
Request
Response
Remarks
JSON
{
"nik":"VALID_NIK",
"name":"VALID_NAME",
"birth_date":"VALID_BIRTH_DATE",
"email":"VALID_EMAIL",
"phone":"VALID_PHONE",
"selfie_photo":"base64 format”,
"ktp_photo":"base64 format”,
"reference_id":””,
}
Success (not_verified)
Note: Failed because of liveness check, only liveness will be charged