# SNAP BI

# Get signature access (asymmetric signature)

##### Endpoint

<table border="1" id="bkmrk-endpoint-method-auth" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 22.7538%;"></col><col style="width: 43.8731%;"></col></colgroup><tbody><tr><td>**Endpoint**</td><td>**Method**  
</td><td>**Server**</td></tr><tr><td>/api/v1.0/utilities/signature-auth</td><td>POST</td><td>https://apidevportal.aspi-indonesia.or.id:44310</td></tr></tbody></table>

##### <span style="font-family: var(--font-heading, var(--font-body)); font-size: 1.4em; font-weight: 400;">  
Header</span>

<table border="1" id="bkmrk-parameter-value-%C2%A0" style="border-collapse: collapse; width: 100%; height: 210.641px;"><colgroup><col style="width: 29.4815%;"></col><col style="width: 52.7592%;"></col><col style="width: 17.7592%;"></col></colgroup><tbody><tr style="height: 29.875px;"><td style="height: 29.875px;">**Parameter**  
</td><td style="height: 29.875px;">**Value**  
</td><td style="height: 29.875px;">**Notes**</td></tr><tr style="height: 80.1875px;"><td style="height: 80.1875px;">X-TIMESTAMP</td><td style="height: 80.1875px;">Today's date UTC+7

Example

2024-11-29T14:15:00+07:00

</td><td style="height: 80.1875px;"></td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">X-CLIENT-KEY</td><td style="height: 35.3906px;">Client id in [Request Aplikasi Pengujian](https://apidevportal.aspi-indonesia.or.id/request-aplikasi-pengujian) page</td><td style="height: 35.3906px;">  
</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">Private\_Key

</td><td style="height: 35.3906px;">Private key in [Request Aplikasi Pengujian](https://apidevportal.aspi-indonesia.or.id/request-aplikasi-pengujian) page</td><td style="height: 35.3906px;">  
</td></tr></tbody></table>

<details id="bkmrk-result-example-body-"><summary>Result example</summary>

<p class="callout info">200 OK</p>

```json
{
    "signature": "ECMld++UIuHBE1JU8oTcpBydvL3noq19LkTur3hWuA8ptyoqGGjXQW7TrG6JgeDMLO2533rXIo3b1hjfT/CCMk4vxGHDFV+YjY0r1e1mSgvYOSWhTss5DOKF0Fk3Lh0XfW5pP+6HglVGX5cluQkTB4fgTyDrJMjHZa5fttMda9S98QznbvtMnz"
}
```

</details><details id="bkmrk-error-example-body-r"><summary>Error example</summary>

<p class="callout danger">400 Bad Request  
X-TIMESTAMP header is not provided or value is empty</p>

```json
{
    "responseCode": "4000000",
    "responseMessage": "The timestamp field is required."
}
```

<p class="callout danger">400 Bad Request  
X-CLIENT-KEY header is not provided or value is empty</p>

```json
{
    "responseCode": "4000000",
    "responseMessage": "The clientId field is required."
}
```

<p class="callout danger">400 Bad Request  
Private\_Key header is not provided or value is empty</p>

```json
{
    "responseCode": "4000000",
    "responseMessage": "The privateKey field is required."
}
```

</details>

# Access token B2B

##### Endpoint

<table border="1" id="bkmrk-endpoint-method-auth" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 33.3731%;"></col><col style="width: 22.7538%;"></col><col style="width: 43.8731%;"></col></colgroup><tbody><tr><td>**Endpoint**</td><td>**Method**  
</td><td>**Server**</td></tr><tr><td>/api/v1.0/access-token/b2b</td><td>POST</td><td>https://apidevportal.aspi-indonesia.or.id:44310</td></tr></tbody></table>

##### <span style="font-family: var(--font-heading, var(--font-body)); font-size: 1.4em; font-weight: 400;">  
Header</span>

<table border="1" id="bkmrk-parameter-value-%C2%A0" style="border-collapse: collapse; width: 100%; height: 180.828px;"><colgroup><col style="width: 29.4815%;"></col><col style="width: 52.7592%;"></col><col style="width: 17.7592%;"></col></colgroup><tbody><tr style="height: 29.875px;"><td style="height: 29.875px;">**Parameter**  
</td><td style="height: 29.875px;">**Value**  
</td><td style="height: 29.875px;">**Notes**</td></tr><tr style="height: 80.1875px;"><td style="height: 80.1875px;">X-TIMESTAMP</td><td style="height: 80.1875px;">Today's date UTC+7

Example

2024-11-29T14:15:00+07:00

</td><td style="height: 80.1875px;"></td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">X-CLIENT-KEY</td><td style="height: 35.3906px;">Client id in [Request Aplikasi Pengujian](https://apidevportal.aspi-indonesia.or.id/request-aplikasi-pengujian) page</td><td style="height: 35.3906px;">  
</td></tr><tr style="height: 35.375px;"><td style="height: 35.375px;">X-SIGNATURE

</td><td style="height: 35.375px;">Asymmetric signature value</td><td style="height: 35.375px;">See [this page](https://documentation.onindonesia.id/books/snap-bi/page/get-signature-access-asymmetric-signature "Get signature access (asymmetric signature)")</td></tr></tbody></table>

<details id="bkmrk-result-example-body-"><summary>Result example</summary>

<p class="callout info">200 OK</p>

```json
{
    "signature": "ECMld++UIuHBE1JU8oTcpBydvL3noq19LkTur3hWuA8ptyoqGGjXQW7TrG6JgeDMLO2533rXIo3b1hjfT/CCMk4vxGHDFV+YjY0r1e1mSgvYOSWhTss5DOKF0Fk3Lh0XfW5pP+6HglVGX5cluQkTB4fgTyDrJMjHZa5fttMda9S98QznbvtMnz"
}
```

</details><details id="bkmrk-error-example-body-r"><summary>Error example</summary>

<p class="callout danger">400 Bad Request  
X-TIMESTAMP header is not provided or value is empty</p>

```json
{
    "responseCode": "4000000",
    "responseMessage": "The timestamp field is required."
}
```

<p class="callout danger">400 Bad Request  
X-CLIENT-KEY header is not provided or value is empty</p>

```json
{
    "responseCode": "4000000",
    "responseMessage": "The clientId field is required."
}
```

<p class="callout danger">400 Bad Request  
Private\_Key header is not provided or value is empty</p>

```json
{
    "responseCode": "4000000",
    "responseMessage": "The privateKey field is required."
}
```

</details>

# Get signature service (symmetric signature)

##### Server

<table border="1" id="bkmrk-environment-link-dev" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 50%;"></col><col style="width: 50%;"></col></colgroup><tbody><tr><td>**Environment**  
</td><td>**Link**  
</td></tr><tr><td>Development</td><td>https://apidevportal.aspi-indonesia.or.id:44310</td></tr></tbody></table>

##### Endpoint

<table border="1" id="bkmrk-endpoint-method-auth" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 65.435%;"></col><col style="width: 34.565%;"></col></colgroup><tbody><tr><td>**Endpoint**</td><td>**Method**  
</td></tr><tr><td>/api/v1.0/utilities/signature-service</td><td>POST</td></tr></tbody></table>

##### Authentication

<table border="1" id="bkmrk-endpoint-method-serv" style="border-collapse: collapse; width: 100%; height: 65.2656px;"><colgroup><col style="width: 46.9607%;"></col><col style="width: 53.0393%;"></col></colgroup><tbody><tr style="height: 29.875px;"><td style="height: 29.875px;">**Parameter**</td><td style="height: 29.875px;">**Token source**  
</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">AccessToken</td><td style="height: 35.3906px;">[Access token B2B](https://documentation.onindonesia.id/books/snap-bi/page/access-token-b2b "Access token B2B")</td></tr></tbody></table>

##### Header

<table border="1" id="bkmrk-parameter-value-%C2%A0" style="border-collapse: collapse; width: 100%; height: 201.25px;"><colgroup><col style="width: 45.0768%;"></col><col style="width: 54.9232%;"></col></colgroup><tbody><tr style="height: 29.875px;"><td style="height: 29.875px;">**Parameter**  
</td><td style="height: 29.875px;">**Value**  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">X-TIMESTAMP</td><td style="height: 46.5938px;">timestampz  
example: 2024-12-01T07:15:00+07:00</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">X-CLIENT-SECRET</td><td style="height: 29.7969px;">Client Secret in "Request Aplikasi Pengujian" page  
</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">EndpoinUrl</td><td style="height: 29.7969px;">/api/v1.0/transfer-va/payment</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">AccessToken</td><td style="height: 35.3906px;">[Access token B2B](https://documentation.onindonesia.id/books/snap-bi/page/access-token-b2b "Access token B2B")</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">HttpMethod</td><td style="height: 29.7969px;">Depends on the service will be using  
Example: Transver VA Payment is using POST, so the value will be POST.</td></tr></tbody></table>

##### Body request (example)

<p class="callout info">Body value is same as the next service</p>

```json
{
    "partnerServiceId": "  088899",
    "customerNo": "12345678901234567890",
    "virtualAccountNo": "  08889912345678901234567890",
    "virtualAccountName": "Tom",
    "virtualAccountEmail": "tom@tts.com",
    "virtualAccountPhone": "6281828384858",
    "trxId": "abcdefgh1234",
    "paymentRequestId": "abcdef-123456-abcdef",
    "channelCode": 6011,
    "hashedSourceAccountNo": "abcdefghijklmnopqrstuvwxyz123456",
    "sourceBankCode": "008",
    "paidAmount": {
        "value": "12345678.00",
        "currency": "IDR"
    },
    "cumulativePaymentAmount": {
        "value": "12345678.00",
        "currency": "IDR"
    },
    "paidBills": "95000",
    "totalAmount": {
        "value": "12345678.00",
        "currency": "IDR"
    },
    "trxDateTime": "20201231T235959Z",
    "referenceNo": "123456789012345",
    "journalNum": "123456",
    "paymentType": 1,
    "flagAdvise": "Y",
    "subCompany": "12345",
    "billDetails": [
        {
            "billCode": "01",
            "billNo": "123456789012345678",
            "billName": "Bill A for Jan",
            "billShortName": "Bill A",
            "billDescription": {
                "english": "Maintenance",
                "indonesia": "Pemeliharaan"
            },
            "billSubCompany": "00001",
            "billAmount": {
                "value": "12345678.00",
                "currency": "IDR"
            },
            "additionalInfo": {},
            "billReferenceNo": "123456789012345"
        }
    ],
    "freeTexts": [
        {
            "english": "Free text",
            "indonesia": "Tulisan bebas"
        }
    ],
    "additionalInfo": {}
}
```

<details id="bkmrk-result-example-body-"><summary>Result example</summary>

<p class="callout info">200 OK</p>

```json
{
    "signature": "YXD+d+yHRKRMz0+aVjLu6K2nQ3Fd9KryoMxvkQPs1CXkSqOvv0"
}
```

</details><details id="bkmrk-error-example-body-r"><summary>Error example</summary>

<p class="callout danger">400 Bad Request  
Request is missing one or more header parameter</p>

```javascript
{
    "responseCode": "4000000",
    "responseMessage": "The <header> field is required."
}
```

</details>

# Transfer kredit - API Virtual Account - Payment

##### Server

<table border="1" id="bkmrk-environment-link-dev" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 50%;"></col><col style="width: 50%;"></col></colgroup><tbody><tr><td>**Environment**</td><td>**Link**</td></tr><tr><td>Development</td><td>https://apidevportal.aspi-indonesia.or.id:44310</td></tr></tbody></table>

##### Endpoint

<table border="1" id="bkmrk-endpoint-method-auth" style="border-collapse: collapse; width: 100%; height: 59.5938px;"><colgroup><col style="width: 50.0596%;"></col><col style="width: 50.0596%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Endpoint**</td><td style="height: 29.7969px;">**Method**  
</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">/api/v1.0/transfer-va/payment</td><td style="height: 29.7969px;">POST</td></tr></tbody></table>

##### Authentication

<table border="1" id="bkmrk-endpoint-method-serv" style="border-collapse: collapse; width: 100%; height: 59.757px;"><colgroup><col style="width: 39.3325%;"></col><col style="width: 60.6675%;"></col></colgroup><tbody><tr style="height: 29.8785px;"><td style="height: 29.8785px;">**Type**  
</td><td style="height: 29.8785px;">**Token source**  
</td></tr><tr style="height: 29.8785px;"><td style="height: 29.8785px;">Bearer</td><td style="height: 29.8785px;">[Access token B2B](https://documentation.onindonesia.id/books/snap-bi/page/access-token-b2b "Access token B2B")</td></tr></tbody></table>

##### Header

<table border="1" id="bkmrk-parameter-value-%C2%A0" style="border-collapse: collapse; width: 100%; height: 279.625px;"><colgroup><col style="width: 64.5241%;"></col><col style="width: 35.4759%;"></col></colgroup><tbody><tr style="height: 29.875px;"><td style="height: 29.875px;">**Parameter**  
</td><td style="height: 29.875px;">**Value**  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">X-TIMESTAMP</td><td style="height: 46.5938px;">timestampz

Example: 2024-12-01T07:15:00+07:00

</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">X-SIGNATURE</td><td style="height: 35.3906px;">[Get signature service (symmetric signature)](https://documentation.onindonesia.id/books/snap-bi/page/get-signature-service-symmetric-signature "Get signature service (symmetric signature)")

</td></tr><tr style="height: 108.172px;"><td style="height: 108.172px;">X-PARTNER-ID</td><td style="height: 108.172px;">Client ID from Request Aplikasi Pengujian page  
URL:

[https://apidevportal.aspi-indonesia.or.id/request-aplikasi-pengujian](https://apidevportal.aspi-indonesia.or.id/request-aplikasi-pengujian)

</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">X-EXTERNAL-ID</td><td style="height: 29.7969px;">Generated From ONMART

</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">CHANNEL-ID</td><td style="height: 29.7969px;">Bank channel ID value. Example: 95051 for KlikBCA Bisnis ([https://developer.bca.co.id/id/Dokumentasi](https://developer.bca.co.id/id/Dokumentasi))

</td></tr></tbody></table>

##### Body request

<p class="callout info">These values must be included into symmetric signature  
[Get signature service (symmetric signature)](https://documentation.onindonesia.id/books/snap-bi/page/get-signature-service-symmetric-signature "Get signature service (symmetric signature)")  
</p>

```json
{
    "partnerServiceId": "  088899",
    "customerNo": "12345678901234567890",
    "virtualAccountNo": "  08889912345678901234567890",
    "virtualAccountName": "Tom",
    "virtualAccountEmail": "tom@tts.com",
    "virtualAccountPhone": "6281828384858",
    "trxId": "abcdefgh1234",
    "paymentRequestId": "abcdef-123456-abcdef",
    "channelCode": 6011,
    "hashedSourceAccountNo": "abcdefghijklmnopqrstuvwxyz123456",
    "sourceBankCode": "008",
    "paidAmount": {
        "value": "12345678.00",
        "currency": "IDR"
    },
    "cumulativePaymentAmount": {
        "value": "12345678.00",
        "currency": "IDR"
    },
    "paidBills": "95000",
    "totalAmount": {
        "value": "12345678.00",
        "currency": "IDR"
    },
    "trxDateTime": "20201231T235959Z",
    "referenceNo": "123456789012345",
    "journalNum": "123456",
    "paymentType": 1,
    "flagAdvise": "Y",
    "subCompany": "12345",
    "billDetails": [
        {
            "billCode": "01",
            "billNo": "123456789012345678",
            "billName": "Bill A for Jan",
            "billShortName": "Bill A",
            "billDescription": {
                "english": "Maintenance",
                "indonesia": "Pemeliharaan"
            },
            "billSubCompany": "00001",
            "billAmount": {
                "value": "12345678.00",
                "currency": "IDR"
            },
            "additionalInfo": {},
            "billReferenceNo": "123456789012345"
        }
    ],
    "freeTexts": [
        {
            "english": "Free text",
            "indonesia": "Tulisan bebas"
        }
    ],
    "additionalInfo": {}
}
```

<table border="1" id="bkmrk-properties-propertie" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 18.7886%;"></col><col style="width: 18.7886%;"></col><col style="width: 11.1248%;"></col><col style="width: 9.91942%;"></col><col style="width: 41.3785%;"></col></colgroup><tbody><tr><td>**Properties**  
</td><td>**Properties of**</td><td>**Data type**</td><td>**Required**</td><td>**Description**</td></tr><tr><td>  
</td><td>  
</td><td>  
</td><td> </td><td>  
</td></tr></tbody></table>

<details id="bkmrk-result-example-body-"><summary>Result example</summary>

<p class="callout info">200 OK</p>

```json
{
    "responseCode": "2002500",
    "responseMessage": "Successful",
    "virtualAccountData": {
        "paymentFlagReason": {
            "english": "Success",
            "indonesia": "Sukses"
        },
        "partnerServiceId": "  088899",
        "customerNo": "12345678901234567890",
        "virtualAccountNo": "  08889912345678901234567890",
        "virtualAccountName": "Tom",
        "virtualAccountEmail": "tom@tts.com",
        "virtualAccountPhone": "6281828384858",
        "trxId": "abcdefgh1234",
        "paymentRequestId": "abcdef-123456-abcdef",
        "paidAmount": {
            "value": "12345678.00",
            "currency": "IDR"
        },
        "paidBills": "95000",
        "totalAmount": {
            "value": "12345678.00",
            "currency": "IDR"
        },
        "trxDateTime": "20201231T235959Z",
        "referenceNo": "123456789012345",
        "journalNum": "123456",
        "paymentType": "1",
        "flagAdvise": "Y",
        "paymentFlagStatus": "00",
        "billDetails": [
            {
                "billerReferenceId": "4146037406",
                "billCode": "01",
                "billNo": "123456789012345678",
                "billName": "Bill A for Jan",
                "billShortName": "Bill A",
                "billDescription": {
                    "english": "Maintenance",
                    "indonesia": "Pemeliharaan"
                },
                "billSubCompany": "00001",
                "billAmount": {
                    "value": "12345678.00",
                    "currency": "IDR"
                },
                "additionalInfo": {},
                "status": "00",
                "reason": {
                    "english": "Success",
                    "indonesia": "Sukses"
                }
            }
        ],
        "freeTexts": [
            {
                "english": "Free text",
                "indonesia": "Tulisan bebas"
            }
        ]
    },
    "additionalInfo": {}
}
```

</details><details id="bkmrk-error-example-body-r"><summary>Error example</summary>

<p class="callout danger">400 Bad Request</p>

```javascript
{
    "responseCode": "4000000",
    "responseMessage": "The signature field is required."
}
```

<p class="callout danger"> 401 Unauthorized</p>

```javascript
{
    "responseCode": "4012500",
    "responseMessage": "Unauthorized. Invalid Signature"
}
```

</details>