# Allobank

### Integration Steps <a href="#pdf-page-l4cw4shmvcmqkjjfz8f6-integration-steps" id="pdf-page-l4cw4shmvcmqkjjfz8f6-integration-steps"></a>

Here is the overview of how to integrate with Allobank :

1. [Account Binding](https://open.gitbook.com/~space/qCxtvLoJNNxvp4U7kLHd/~changes/xks6ABOMESCkz47z8vNy/~gitbook/pdf?back=false\&only=yes\&page=L4cw4ShmVcMQKJJFZ8f6#pdf-page-L4cw4ShmVcMQKJJFZ8f6-account-binding)
2. [Check Balance Inquiry](https://open.gitbook.com/~space/qCxtvLoJNNxvp4U7kLHd/~changes/xks6ABOMESCkz47z8vNy/~gitbook/pdf?back=false\&only=yes\&page=L4cw4ShmVcMQKJJFZ8f6#pdf-page-L4cw4ShmVcMQKJJFZ8f6-check-balance-inquiry)
3. [Payment](https://open.gitbook.com/~space/qCxtvLoJNNxvp4U7kLHd/~changes/xks6ABOMESCkz47z8vNy/~gitbook/pdf?back=false\&only=yes\&page=L4cw4ShmVcMQKJJFZ8f6#pdf-page-L4cw4ShmVcMQKJJFZ8f6-payment)
4. [Acknowledge Payment Notification](https://open.gitbook.com/~space/qCxtvLoJNNxvp4U7kLHd/~changes/xks6ABOMESCkz47z8vNy/~gitbook/pdf?back=false\&only=yes\&page=L4cw4ShmVcMQKJJFZ8f6#pdf-page-L4cw4ShmVcMQKJJFZ8f6-acknowledge-payment-notification)

***

#### Account Binding <a href="#pdf-page-l4cw4shmvcmqkjjfz8f6-account-binding" id="pdf-page-l4cw4shmvcmqkjjfz8f6-account-binding"></a>

Merchant can binding Allobank account to customer id, each Allobank account can only binding to one customer on one merchant. Customer need to verify OTP and input PIN on Allobank page.

Here is the flow for Account Binding :

<figure><img src="https://open.gitbook.com/~gitbook/image?url=https%3A%2F%2F3092822868-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FqCxtvLoJNNxvp4U7kLHd%252Fuploads%252FWdgYVs0w1hCwAg0YqHJR%252F24112023%2520Checkout_Account%2520Binding.png%3Falt%3Dmedia%26token%3De6732909-79c3-473d-822b-c991bef8313e&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=b4083a0d&#x26;sv=1" alt=""><figcaption></figcaption></figure>

**API Endpoint**

| Environment    | Endpoint                                                        |
| -------------- | --------------------------------------------------------------- |
| HTTP Method    | POST                                                            |
| API Sandbox    | [https://api-sandbox.doku.com](https://api-sandbox.doku.com/)   |
| API Production | [https://api.doku.com](https://api.doku.com/)                   |
| Path           | `/direct-debit/merchant/allo/v1.0/registration-account-binding` |

Here is the sample request header, request body and response body for Account Binding - AlloBank

{% openapi src="<https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2F8UagHgpjBH83i1zFuoeC%2Fopenapi-allobank.json?alt=media&token=87402c42-ed1b-4fb6-aa14-960710557b8a>" path="/direct-debit/merchant/allo/v1.0/registration-account-binding" method="post" %}
[openapi-allobank.json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2F8UagHgpjBH83i1zFuoeC%2Fopenapi-allobank.json?alt=media\&token=87402c42-ed1b-4fb6-aa14-960710557b8a)
{% endopenapi %}

#### Check Balance Inquiry <a href="#pdf-page-l4cw4shmvcmqkjjfz8f6-check-balance-inquiry" id="pdf-page-l4cw4shmvcmqkjjfz8f6-check-balance-inquiry"></a>

Once a customer has linked their account through the Allobank platform, merchants can initiate a Balance Inquiry via the this API to obtain accurate and up-to-date account balance information.

Here is the flow for Check Balance Inquiry :

<figure><img src="https://open.gitbook.com/~gitbook/image?url=https%3A%2F%2F3092822868-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FqCxtvLoJNNxvp4U7kLHd%252Fuploads%252FENI0g3fvH3TuVBc2TfNA%252F24112023%2520Checkout_Balance%2520Inquiry%2520%281%29.png%3Falt%3Dmedia%26token%3Dc033c64d-f489-4226-b5bd-23257ff2a961&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=3ccd6563&#x26;sv=1" alt=""><figcaption></figcaption></figure>

**API Endpoint**

| Environment    | Endpoint                                                      |
| -------------- | ------------------------------------------------------------- |
| HTTP Method    | POST                                                          |
| API Sandbox    | [https://api-sandbox.doku.com](https://api-sandbox.doku.com/) |
| API Production | [https://api.doku.com](https://api.doku.com/)                 |
| Path           | .....`/direct-debit/merchant/allo/v1.0/balance-inquiry`       |

Here is the sample request header, request body and response body for Check Balance Inquiry Allobank  :&#x20;

{% openapi src="<https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2F8UagHgpjBH83i1zFuoeC%2Fopenapi-allobank.json?alt=media&token=87402c42-ed1b-4fb6-aa14-960710557b8a>" path="/direct-debit/merchant/allo/v1.0/balance-inquiry" method="post" %}
[openapi-allobank.json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2F8UagHgpjBH83i1zFuoeC%2Fopenapi-allobank.json?alt=media\&token=87402c42-ed1b-4fb6-aa14-960710557b8a)
{% endopenapi %}

#### Payment <a href="#pdf-page-l4cw4shmvcmqkjjfz8f6-payment" id="pdf-page-l4cw4shmvcmqkjjfz8f6-payment"></a>

After merchant check the balance, merchant can hit this API to do payment. DOKU will deduct customer's balance.

Here is the flow for Payment Allobank :

<figure><img src="https://open.gitbook.com/~gitbook/image?url=https%3A%2F%2F3092822868-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FqCxtvLoJNNxvp4U7kLHd%252Fuploads%252Ff6FIeFXfkOXHn1YfpYn8%252F24112023%2520Checkout_SNAP%2520payment%2520-%2520allobank.png%3Falt%3Dmedia%26token%3D53d0da1a-c576-4f6f-9781-de997c01d53f&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=88979f30&#x26;sv=1" alt=""><figcaption></figcaption></figure>

**API Endpoint**

| Environment    | Endpoint                                                      |
| -------------- | ------------------------------------------------------------- |
| HTTP Method    | POST                                                          |
| API Sandbox    | [https://api-sandbox.doku.com](https://api-sandbox.doku.com/) |
| API Production | [https://api.doku.com](https://api.doku.com/)                 |
| Path           | .....`/direct-debit/merchant/allo/v1.0/payment/host-to-host`  |

{% openapi src="<https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2F8UagHgpjBH83i1zFuoeC%2Fopenapi-allobank.json?alt=media&token=87402c42-ed1b-4fb6-aa14-960710557b8a>" path="/direct-debit/merchant/allo/v1.0/payment-host-to-host" method="post" %}
[openapi-allobank.json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2F8UagHgpjBH83i1zFuoeC%2Fopenapi-allobank.json?alt=media\&token=87402c42-ed1b-4fb6-aa14-960710557b8a)
{% endopenapi %}

#### Acknowledge Payment Notification <a href="#pdf-page-l4cw4shmvcmqkjjfz8f6-acknowledge-payment-notification" id="pdf-page-l4cw4shmvcmqkjjfz8f6-acknowledge-payment-notification"></a>

After the payment is being made by your customer, DOKU will send **HTTP Notification** to your defined `Notification URL`. Learn how to [handle the notification from DOKU](https://app.gitbook.com/s/qCxtvLoJNNxvp4U7kLHd/getting-started-with-doku-api/notification) .

### Additional Feature <a href="#pdf-page-l4cw4shmvcmqkjjfz8f6-additional-feature" id="pdf-page-l4cw4shmvcmqkjjfz8f6-additional-feature"></a>

#### Online Refund <a href="#pdf-page-l4cw4shmvcmqkjjfz8f6-online-refund" id="pdf-page-l4cw4shmvcmqkjjfz8f6-online-refund"></a>

Merchant can refund the transaction to DOKU. Hit this API to refund the transaction. Currently DOKU Support Full Refund.

Here is the Refund Flow :

<figure><img src="https://open.gitbook.com/~gitbook/image?url=https%3A%2F%2F3092822868-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FqCxtvLoJNNxvp4U7kLHd%252Fuploads%252FYWPk6oDdUVSrDkVzNakG%252F24112023%2520Checkout_Refund.png%3Falt%3Dmedia%26token%3D4932b55a-f1a6-43e9-bde0-22a94e4a2041&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=6849b7a&#x26;sv=1" alt=""><figcaption></figcaption></figure>

**API Endpoint**

| Environment    | Endpoint                                                      |
| -------------- | ------------------------------------------------------------- |
| HTTP Method    | POST                                                          |
| API Sandbox    | [https://api-sandbox.doku.com](https://api-sandbox.doku.com/) |
| API Production | [https://api.doku.com](https://api.doku.com/)                 |
| Path           | .....`/direct-debit/merchant/allo/v1.0/debit/refund`          |

{% openapi src="<https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2F8UagHgpjBH83i1zFuoeC%2Fopenapi-allobank.json?alt=media&token=87402c42-ed1b-4fb6-aa14-960710557b8a>" path="/direct-debit/merchant/allo/v1.0/debit/refund" method="post" %}
[openapi-allobank.json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2F8UagHgpjBH83i1zFuoeC%2Fopenapi-allobank.json?alt=media\&token=87402c42-ed1b-4fb6-aa14-960710557b8a)
{% endopenapi %}

#### Account Unbinding <a href="#pdf-page-l4cw4shmvcmqkjjfz8f6-account-unbinding" id="pdf-page-l4cw4shmvcmqkjjfz8f6-account-unbinding"></a>

In case you need to remove the customer data on DOKU, hit this API to unbinding the customer data.

**API Endpoint**

| Environment    | Endpoint                                                      |
| -------------- | ------------------------------------------------------------- |
| HTTP Method    | POST                                                          |
| API Sandbox    | [https://api-sandbox.doku.com](https://api-sandbox.doku.com/) |
| API Production | [https://api.doku.com](https://api.doku.com/)                 |
| Path           | .....`/direct-debit/allo/v1.0/registration-account-unbinding` |

{% openapi src="<https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2F8UagHgpjBH83i1zFuoeC%2Fopenapi-allobank.json?alt=media&token=87402c42-ed1b-4fb6-aa14-960710557b8a>" path="/direct-debit/allo/v1.0/registration-account-unbinding" method="post" %}
[openapi-allobank.json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2F8UagHgpjBH83i1zFuoeC%2Fopenapi-allobank.json?alt=media\&token=87402c42-ed1b-4fb6-aa14-960710557b8a)
{% endopenapi %}
