> For the complete documentation index, see [llms.txt](https://docs.kredibel.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kredibel.io/api-references/electronic-certificate/certificate-issuance.md).

# Certificate Issuance

The Electronic Certificate Issuance Service is the activity of identity checking that shows legal subjects in order to issue an Electronic Certificate with the purpose of doing verification of citizen

{% hint style="info" %}
This module only support verification for indonesian identity card (KTP)
{% endhint %}

##

{% embed url="<https://youtu.be/lA6hLFor2dc>" %}

## Endpoints

| Method | URL                                       |
| ------ | ----------------------------------------- |
| POST   | `$synapses`**`/v1/certificate/issuance`** |

### Headers

| Header          | Value                                           |
| --------------- | ----------------------------------------------- |
| `Content-Type`  | `application/json`                              |
| `Authorization` | `Bearer` [`YOUR_API_KEY`](/authentication-1.md) |

### **Request**

{% tabs %}
{% tab title="Description" %}

| Field                                                            | Type                                                                  | Description                                                |
| ---------------------------------------------------------------- | --------------------------------------------------------------------- | ---------------------------------------------------------- |
| <p>identityId</p><p><strong><code>(required)</code></strong></p> | <p><code>String</code><br><strong><code>(len: 16)</code></strong></p> | Nomor induk kependudukan (NIK) based on the identity card. |
| <p>fullName</p><p><strong><code>(required)</code></strong>       |                                                                       |                                                            |

</p>      | `String`                                                                         | Full name based on the identity card.                                                                                                                                                                                                 |
| <p>birthDate<br><strong><code>(required)</code></strong></p>         | <p><code>String</code><br><strong><code>(format: yyyy-mm-dd)</code></strong></p> | Birth Date based on the identity card.                                                                                                                                                                                                |
| <p>emailAddress<br><strong><code>(required)</code></strong></p>      | `String`                                                                         | Email address (must be unique per NIK).                                                                                                                                                                                               |
| <p>phoneNumber<br><strong><code>(required)</code></strong></p>       | `String`                                                                         | Valid phone number, use country code but without symbol (+), (must be unique per nik).                                                                                                                                                |
| <p>faceImage </p><p><strong><code>(required)</code></strong></p>     | `Base64`                                                                         | <p>Selfie photo of the identity card holder.</p><p></p><p>Image binary encoded in base64 without &#x3C;data:image/png;>.<br>- Supports: JPG, JPEG, PNG, SVG<br>- Min Size: 100KB<br>- Max Size: 4MB<br>- Min Pixel: 480px x 640px</p> |
| <p>identityImage </p><p><strong><code>(required)</code></strong></p> | `Base64`                                                                         | <p>Identity card photo.</p><p></p><p>Image binary encoded in base64 without &#x3C;data:image/png;>.<br>- Supports: JPG, JPEG, PNG, SVG<br>- Min Size: 100KB<br>- Max Size: 2MB<br>- Min Pixel: 480px x 360px</p>                      |
{% endtab %}

{% tab title="Example" %}

```
{
    "identityId": "1234567890123456",
    "fullName": "ASEP SUPRIYADI",
    "birthDate": "1990-07-06",
    "emailAddress": "test@email.com",
    "phoneNumber": "621234567890",
    "faceImage": "<base64>",
    "identityImage": "<base64>"
}
```

{% endtab %}
{% endtabs %}

#### **Testing**

{% hint style="info" %}
In the sandbox environment, we only response api call with dummy data. To get valid response data, you can use our production environment instead.
{% endhint %}

{% tabs %}
{% tab title="All Match" %}
You can use any identityId to produce verified status.

**Example:**

```
{
    "identityId": "1234567890123456",
    "fullName": "ASEP SUPRIYADI",
    "birthDate": "1990-07-06",
    "emailAddress": "test@email.com",
    "phoneNumber": "621234567890",
    "faceImage": "<base64>",
    "identityImage": "<base64>"
}
```

```
{
    "message": "Certificate electronic verification has been done",
    "data": {
        "id": "8c4d6927-b4e1-428b-b95f-c21b6734b73f",
        "status": "verified",
        "rejectFields": [],
        "referenceId": "ref_certel#e87c8bc2-5d10-455b-98a0-187d60f72873"
    }
}
```

{% endtab %}

{% tab title="Invalid NIK" %}
You can use identityId =`1234567890111111` to produce invalid identityId.

**Example:**

```
{
    "identityId": "1234567890111111",
    "fullName": "ASEP SUPRIYADI",
    "birthDate": "1990-07-06",
    "emailAddress": "test@email.com",
    "phoneNumber": "621234567890",
    "faceImage": "<base64>",
    "identityImage": "<base64>"
}
```

```
{
    "message": "Certificate electronic verification has been done",
    "data": {
        "id": "93db29c0-ca66-4803-aa70-537439c9cfff",
        "status": "not_verified",
        "rejectFields": [
            "identityId"
        ],
        "referenceId": "ref_certel#3c42fa6b-c2c9-4705-8117-cf9d08c8d2aa"
    }
}
```

{% endtab %}

{% tab title="Invalid Name" %}
You can use identityId =`1234567890111112` to produce invalid fullName.

**Example:**

```
{
    "identityId": "1234567890111112",
    "fullName": "ASEP SUPRIYADI",
    "birthDate": "1990-07-06",
    "emailAddress": "test@email.com",
    "phoneNumber": "621234567890",
    "faceImage": "<base64>",
    "identityImage": "<base64>"
}
```

```
{
    "message": "Certificate electronic verification has been done",
    "data": {
        "id": "716ccf7d-4620-4146-b889-8c660cc8f280",
        "status": "not_verified",
        "rejectFields": [
            "fullName"
        ],
        "referenceId": "ref_certel#8c679bd3-087b-49f7-bdd6-3f5c6300a927"
    }
}
```

{% endtab %}

{% tab title="Invalid Birth Date" %}
You can use identityId=`1234567890111113` to produce invalid birthDate.

**Example:**

```
{
    "identityId": "1234567890111113",
    "fullName": "ASEP SUPRIYADI",
    "birthDate": "1990-07-06",
    "emailAddress": "test@email.com",
    "phoneNumber": "621234567890",
    "faceImage": "<base64>",
    "identityImage": "<base64>"
}
```

```
{
    "message": "Certificate electronic verification has been done",
    "data": {
        "id": "bba69765-371c-45ac-b673-4bb36f07ab9c",
        "status": "not_verified",
        "rejectFields": [
            "birthDate"
        ],
        "referenceId": "ref_certel#763f7342-66f6-47eb-87d2-e9a11378d911"
    }
}
```

{% endtab %}

{% tab title="Invalid Face Image" %}
You can use identityId=`1234567890111114` to produce invalid face image.

**Example:**

```
{
    "identityId": "1234567890111114",
    "fullName": "ASEP SUPRIYADI",
    "birthDate": "1990-07-06",
    "emailAddress": "test@email.com",
    "phoneNumber": "621234567890",
    "faceImage": "<base64>",
    "identityImage": "<base64>"
}
```

```
{
    "message": "Certificate electronic verification has been done",
    "data": {
        "id": "a940e1e9-22f0-4154-8b0f-6219b417a6b1",
        "status": "not_verified",
        "rejectFields": [
            "faceImage"
        ],
        "referenceId": "ref_certel#8c946fc0-5ac2-4120-9ee5-415baf0b0e3a"
    }
}
```

{% endtab %}

{% tab title="Invalid Identity Image" %}
You can use identityId=`1234567890111115` to produce invalid identityImage.

**Example:**

```
{
    "identityId": "1234567890111115",
    "fullName": "ASEP SUPRIYADI",
    "birthDate": "1990-07-06",
    "emailAddress": "test@email.com",
    "phoneNumber": "621234567890",
    "faceImage": "<base64>",
    "identityImage": "<base64>"
}
```

```
{
    "message": "Certificate electronic verification has been done",
    "data": {
        "id": "3e37f95d-a1e8-4d89-8f0c-0f267ea0a36a",
        "status": "not_verified",
        "rejectFields": [
            "identityImage"
        ],
        "referenceId": "ref_certel#8c946fc0-5ac2-4120-9ee5-415baf0b0e2s"
    }
}
```

{% endtab %}

{% tab title="Invalid Email Address" %}
{% hint style="info" %}
It means that the email, phone number, or both have been used by another NIK (identification number).
{% endhint %}

You can use identityId=`1234567890111116` to produce invalid emailAddress.

**Example:**

```
{
    "identityId": "1234567890111116",
    "fullName": "ASEP SUPRIYADI",
    "birthDate": "1990-07-06",
    "emailAddress": "test@email.com",
    "phoneNumber": "621234567890",
    "faceImage": "<base64>",
    "identityImage": "<base64>"
}
```

```
{
    "message": "Certificate electronic verification has been done",
    "data": {
        "id": "368fea8e-0fad-4bc3-8ef6-fa2d8585d1d7",
        "status": "verified_with_reason",
        "rejectFields": [
            "emailAddress"
        ],
        "referenceId": "ref_certel#dfb8b449-4d83-41e8-b2f4-0343ead765f4"
    }
}
```

{% endtab %}

{% tab title="Invalid Phone Number" %}
{% hint style="info" %}
It means that the email, phone number, or both have been used by another NIK (identification number).
{% endhint %}

You can use identityId=`1234567890111117` to produce invalid phoneNumber.

**Example:**

```
{
    "identityId": "1234567890111117",
    "fullName": "ASEP SUPRIYADI",
    "birthDate": "1990-07-06",
    "emailAddress": "test@email.com",
    "phoneNumber": "621234567890",
    "faceImage": "<base64>",
    "identityImage": "<base64>"
}
```

```
{
    "message": "Certificate electronic verification has been done",
    "data": {
        "id": "a67c4ab8-c723-49f1-a2a8-e7a579df94f7",
        "status": "verified_with_reason",
        "rejectFields": [
            "phoneNumber"
        ],
        "referenceId": "ref_certel#a704a3ad-1986-4897-975e-16e015d88b2e"
    }
}
```

{% endtab %}

{% tab title="Invalid Email Address & Phone Number" %}
{% hint style="info" %}
It means that the email, phone number, or both have been used by another NIK (identification number).
{% endhint %}

You can use identityId=`1234567890111118` to produce invalid Email Address & phoneNumber.

**Example:**

```
{
    "identityId": "1234567890111118",
    "fullName": "ASEP SUPRIYADI",
    "birthDate": "1990-07-06",
    "emailAddress": "test@email.com",
    "phoneNumber": "621234567890",
    "faceImage": "<base64>",
    "identityImage": "<base64>"
}
```

```
{
    "message": "Certificate electronic verification has been done",
    "data": {
        "id": "d35484cc-7f49-4d23-8fdd-3052fd96c8b6",
        "status": "verified_with_reason",
        "rejectFields": [
            "phoneNumber",
            "emailAddress"
        ],
        "referenceId": "ref_certel#3c42fa6b-c2c9-4705-8117-cf9d08c8d2aa"
    }
}
```

{% endtab %}

{% tab title="Liveness Error" %}
{% hint style="info" %}
Failed because of liveness check, only liveness will be charged
{% endhint %}

You can use identityId=`1234567890111119` to produce liveness error.

**Example:**

```
{
    "identityId": "1234567890111119",
    "fullName": "ASEP SUPRIYADI",
    "birthDate": "1990-07-06",
    "emailAddress": "test@email.com",
    "phoneNumber": "621234567890",
    "faceImage": "<base64>",
    "identityImage": "<base64>"
}
```

```
{
    "message": "Certificate electronic verification has been done",
    "data": {
        "id": "36a6ed7b-cd7a-44d7-b4d2-d181cf561ea3",
        "status": "not_verified",
        "rejectFields": [
            "liveness_check"
        ],
        "referenceId": "ref_certel#3c42fa6b-c2c9-4705-8117-cf9d08c8d2aa"
    }
}
```

{% endtab %}
{% endtabs %}

### **Response**

{% tabs %}
{% tab title="Description" %}

| Field        | Type     | Description                                                                                                        |
| ------------ | -------- | ------------------------------------------------------------------------------------------------------------------ |
| id           | `String` | Kredibel history id (unique for every transactions).                                                               |
| status       | `String` | <p>Identifier of the transaction status:</p><p>- verified</p><p>- verified\_with\_reason</p><p>- not\_verified</p> |
| rejectFields | `Array`  | Indicator if there’s a false response to a or any parameter, example if nik.                                       |
| referenceId  | `String` | Reference id.                                                                                                      |
| {% endtab %} |          |                                                                                                                    |

{% tab title="Example" %}

```
{
    "message": "Certificate electronic verification has been done",
    "data": {
        "id": "8c4d6927-b4e1-428b-b95f-c21b6734b73f",
        "status": "verified",
        "rejectFields": [],
        "referenceId": "ref_certel#e87c8bc2-5d10-455b-98a0-187d60f72873"
    }
}
```

{% endtab %}
{% endtabs %}

### **Errors**

{% hint style="info" %}
Please read this [page \<Responses & Errors>](/responses-and-errors.md) to know more about response.
{% endhint %}
