# Allo Bank Direct Debit

## Integration Steps

Overview of integration process with Allo Bank Direct Debit

1. [Account Binding](#account-binding)
2. [Balance Inquiry](#check-balance-inquiry)
3. [Payment](#payment)
4. [Payment Notification](#payment-notification)
5. [Additional Feature](#additional-feature)

***

### 1. Account Binding

Account Binding process should be done before payment can be made and processed. Merchant will send account binding request from customer to DOKU. The request includes customer's phone number that is registered to customer's Allo Bank account.&#x20;

Each Allo Bank account can only be bind to one customer on one merchant. Customer needs to do verification for account binding process by inputting OTP and PIN.

**Account Binding Flow**

<figure><img src="/files/4CwxfA94hbRJSYK3oQi3" alt=""><figcaption><p>Account Binding Flow - Allo Bank Direct Debit</p></figcaption></figure>

#### API Endpoint

<table><thead><tr><th width="170">Environment</th><th>Endpoint</th></tr></thead><tbody><tr><td>HTTP Method</td><td>POST</td></tr><tr><td>API Sandbox</td><td><a href="https://api-sandbox.doku.com">https://api-sandbox.doku.com</a></td></tr><tr><td>API Production</td><td><a href="https://api.doku.com">https://api.doku.com</a></td></tr><tr><td>Path</td><td><code>.../direct-debit/core/v1/registration-account-binding</code></td></tr></tbody></table>

**Sample of Request Header, Request Body and Response Body**

Notes:&#x20;

Parameter with (\*) is mandatory&#x20;

Paramater without (\*) is optional/conditional

{% openapi src="/files/rwEg6uB9Zl5QwoF88Ywu" path="/direct-debit/core/v1/registration-account-binding" method="post" %}
[swagger-dd-allo.yaml](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FZXLraFme3WEsG3RoU2jt%2Fswagger-dd-allo.yaml?alt=media\&token=7ffbc464-7f02-4f46-b2ff-18f4a24e2688)
{% endopenapi %}

### 2. Balance Inquiry

After customer has bind/linked their Allo Bank account, customer can check their account balance infirmation using Balance Inquiry. Merchant will send balance inquiry request from customer to DOKU. The request includes customer's token.&#x20;

Merchant can also use balance inquiry API to check if customer has sufficient balance before invoking payment process.

**Balance Inquiry Flow**

<figure><img src="/files/2dHryQHw0WwKeszjanaQ" alt=""><figcaption><p>Balance Inquiry Flow - Allo Bank Direct Debit</p></figcaption></figure>

#### API Endpoint

<table><thead><tr><th width="196">Environment</th><th>Endpoint</th></tr></thead><tbody><tr><td>HTTP Method</td><td>POST</td></tr><tr><td>API Sandbox</td><td><a href="https://api-sandbox.doku.com">https://api-sandbox.doku.com</a></td></tr><tr><td>API Production</td><td><a href="https://api.doku.com">https://api.doku.com</a></td></tr><tr><td>Path</td><td><code>.../direct-debit/core/v1/balance-inquiry</code></td></tr></tbody></table>

**Sample of Request Header, Request Body and Response Body**

Notes:&#x20;

Parameter with (\*) is mandatory&#x20;

Paramater without (\*) is optional/conditional

{% openapi src="/files/1eakfdJDYm2bO8m0ityQ" path="/direct-debit/core/v1/balance-inquiry" method="post" %}
[swagger-dd-allo.yaml](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FSw5xFIBVq4vPkfLDCe2d%2Fswagger-dd-allo.yaml?alt=media\&token=52ad6574-4717-4ce3-833a-d7af24a7d3c6)
{% endopenapi %}

### 3. Payment&#x20;

After customer's account is bind/linked and customer has enough balance for payment, merchant can send payment request from customer to DOKU by bringing customer's token.&#x20;

**Payment Flow**

<figure><img src="/files/X4nHOx5EeHTh5aF36dDM" alt=""><figcaption><p>Payment Flow - Allo Bank Direct Debit</p></figcaption></figure>

#### API Endpoint&#x20;

<table><thead><tr><th width="203">Environment</th><th>Endpoint</th></tr></thead><tbody><tr><td>HTTP Method</td><td>POST</td></tr><tr><td>API Sandbox</td><td><a href="https://api-sandbox.doku.com">https://api-sandbox.doku.com</a></td></tr><tr><td>API Production</td><td><a href="https://api.doku.com">https://api.doku.com</a></td></tr><tr><td>Path</td><td><code>.../direct-debit/core/v1/debit/payment-host-to-host</code></td></tr></tbody></table>

**Sample of Request Header, Request Body and Response Body**

Notes:&#x20;

Parameter with (\*) is mandatory&#x20;

Paramater without (\*) is optional/conditional

{% openapi src="/files/splZI3LQUFCrIl1DGrqe" path="/direct-debit/core/v1/debit/payment-host-to-host" method="post" %}
[swagger-dd-allo.yaml](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FkMED0JssoESt4SguGuiD%2Fswagger-dd-allo.yaml?alt=media\&token=d82ceac4-19af-4d52-8d1e-e67eb3d690ce)
{% endopenapi %}

### 4. Payment Notification

After payment is completed, DOKU will send **HTTP Notification** to merchant's defined `Notification URL`.  Learn how to [handle the notification from DOKU](/get-started-with-doku-api/notification.md).

### 5. Additional Feature

### Online Refund

This endpoint is used to create refund request for previous successful payment. Merchant can request a transaction refund to DOKU. Full refund and partial refund are available to be requested

**Online Refund Flow**

<figure><img src="/files/9uLyS7KXEgymVT5g2AfX" alt=""><figcaption><p>Online Refund Flow - Allo Bank Direct Debit</p></figcaption></figure>

#### API Endpoint&#x20;

<table><thead><tr><th width="215">Environment</th><th>Endpoint</th></tr></thead><tbody><tr><td>HTTP Method</td><td>POST</td></tr><tr><td>API Sandbox</td><td><a href="https://api-sandbox.doku.com">https://api-sandbox.doku.com</a></td></tr><tr><td>API Production</td><td><a href="https://api.doku.com">https://api.doku.com</a></td></tr><tr><td>Path</td><td><code>.../direct-debit/core/v1/debit/refund</code></td></tr></tbody></table>

**Sample of Request Header, Request Body and Response Body**

Notes:&#x20;

Parameter with (\*) is mandatory&#x20;

Paramater without (\*) is optional/conditional

{% openapi src="/files/rbGiMBn1DE6zRKEnCsnu" path="/direct-debit/core/v1/debit/refund" method="post" %}
[swagger-dd-allo.yaml](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FVCYOKw46b3xQWjJlXHZ9%2Fswagger-dd-allo.yaml?alt=media\&token=a1acaa1a-720b-44cc-bd59-28c79392f3cd)
{% endopenapi %}

### Account Unbinding

If a registered customer no longer wants their account/card to be bind/linked and wish to remove themself from DOKU's and merchant’s system, merchant can send account unbinding request that is initiated by customer.

#### API Endpoint&#x20;

<table><thead><tr><th width="199">Environment</th><th>Endpoint</th></tr></thead><tbody><tr><td>HTTP Method</td><td>POST</td></tr><tr><td>API Sandbox</td><td><a href="https://api-sandbox.doku.com">https://api-sandbox.doku.com</a></td></tr><tr><td>API Production</td><td><a href="https://api.doku.com">https://api.doku.com</a></td></tr><tr><td>Path</td><td><code>.../direct-debit/v1/registration-account-unbinding</code></td></tr></tbody></table>

**Sample of Request Header, Request Body and Response Body**

Notes:&#x20;

Parameter with (\*) is mandatory&#x20;

Paramater without (\*) is optional/conditional

{% openapi src="/files/rwEg6uB9Zl5QwoF88Ywu" path="/direct-debit/core/v1/registration-account-unbinding" method="post" %}
[swagger-dd-allo.yaml](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FZXLraFme3WEsG3RoU2jt%2Fswagger-dd-allo.yaml?alt=media\&token=7ffbc464-7f02-4f46-b2ff-18f4a24e2688)
{% endopenapi %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.doku.com/accept-payments/direct-api/snap/integration-guide/direct-debit/allo-bank-direct-debit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
