# CIMB Direct Debit

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

Here is the overview of how to integrate with CIMB Direct Debit ::

1. [Account Binding](https://open.gitbook.com/~space/qCxtvLoJNNxvp4U7kLHd/~changes/xks6ABOMESCkz47z8vNy/~gitbook/pdf?back=false\&only=yes\&page=US8G8gOUOEmnqwXgbQ7f#pdf-page-US8G8gOUOEmnqwXgbQ7f-account-binding)
2. [OTP Verification](https://open.gitbook.com/~space/qCxtvLoJNNxvp4U7kLHd/~changes/xks6ABOMESCkz47z8vNy/~gitbook/pdf?back=false\&only=yes\&page=US8G8gOUOEmnqwXgbQ7f#pdf-page-US8G8gOUOEmnqwXgbQ7f-otp-verification)
3. [Payment](https://open.gitbook.com/~space/qCxtvLoJNNxvp4U7kLHd/~changes/xks6ABOMESCkz47z8vNy/~gitbook/pdf?back=false\&only=yes\&page=US8G8gOUOEmnqwXgbQ7f#pdf-page-US8G8gOUOEmnqwXgbQ7f-payment)
4. [Acknowledge Payment Notification](https://open.gitbook.com/~space/qCxtvLoJNNxvp4U7kLHd/~changes/xks6ABOMESCkz47z8vNy/~gitbook/pdf?back=false\&only=yes\&page=US8G8gOUOEmnqwXgbQ7f#pdf-page-US8G8gOUOEmnqwXgbQ7f-acknowledge-payment-notification)

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

Merchant can binding CIMB account to customer id, each account can only binding to one customer on one merchant. Customer need to verify OTP and input PIN on CIMB 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%252FRFmpnAK6RG1Rjh6M7OF4%252F24112023%2520Checkout_Account%2520Binding%2520%283%29.png%3Falt%3Dmedia%26token%3D8ed2b7ad-ede8-4dcd-b473-88801155437e&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=815dea67&#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/allo/v1.0/registration-account-binding`        |

Here is the sample request header, request body and response body for Account Binding - CIMB&#x20;

{% openapi src="/files/zfV1wEzQikzJFqW68P8O" path="/direct-debit/merchant/cimb/v1.0/registration-account-binding" method="post" %}
[openapi3\_0-cimb.json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FZfILARIvmKJJ0G1Wbwo1%2Fopenapi3_0-cimb.json?alt=media\&token=7468638a-18d6-46a9-b4e5-f65db1463097)
{% endopenapi %}

#### OTP Verification <a href="#pdf-page-us8g8gouoemnqwxgbq7f-otp-verification" id="pdf-page-us8g8gouoemnqwxgbq7f-otp-verification"></a>

Once a customer has linked their account through the CIMB platform, merchants needs to verify the account. Merchant can hit this API to verify the OTP :

Here is the flow for OTP Verification :

<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%252FJrCuTbls3Ltq7hs0Xu9l%252F24112023%2520Checkout_Verify%2520OTP.png%3Falt%3Dmedia%26token%3Dbc4fe067-065a-4eec-8b1a-ee086b652cf7&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=2812f995&#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/cimb/v1.0/otp-verification`           |

{% openapi src="/files/zfV1wEzQikzJFqW68P8O" path="/direct-debit/merchant/cimb/v1.0/otp-verification" method="post" %}
[openapi3\_0-cimb.json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FZfILARIvmKJJ0G1Wbwo1%2Fopenapi3_0-cimb.json?alt=media\&token=7468638a-18d6-46a9-b4e5-f65db1463097)
{% endopenapi %}

#### Payment <a href="#pdf-page-us8g8gouoemnqwxgbq7f-payment" id="pdf-page-us8g8gouoemnqwxgbq7f-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 CIMB :

<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%252FZkQI5zjUGmqvMAoTHdia%252F24112023%2520Checkout_SNAP%2520payment%2520-%2520CIMB.png%3Falt%3Dmedia%26token%3D3a96bf8a-28f7-4f75-b289-c367ff708f3a&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=8c88b5ba&#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="/files/zfV1wEzQikzJFqW68P8O" path="/direct-debit/merchant/cimb/v1.0/payment-host-to-host" method="post" %}
[openapi3\_0-cimb.json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FZfILARIvmKJJ0G1Wbwo1%2Fopenapi3_0-cimb.json?alt=media\&token=7468638a-18d6-46a9-b4e5-f65db1463097)
{% endopenapi %}

#### Acknowledge Payment Notification <a href="#pdf-page-us8g8gouoemnqwxgbq7f-acknowledge-payment-notification" id="pdf-page-us8g8gouoemnqwxgbq7f-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-us8g8gouoemnqwxgbq7f-additional-feature" id="pdf-page-us8g8gouoemnqwxgbq7f-additional-feature"></a>

#### Online Refund <a href="#pdf-page-us8g8gouoemnqwxgbq7f-online-refund" id="pdf-page-us8g8gouoemnqwxgbq7f-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%252F4BdAaA6ku742msJ2XGGy%252F24112023%2520Checkout_Refund%2520%281%29.png%3Falt%3Dmedia%26token%3D6d270683-597e-498f-8691-b84a63ac1673&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=bdcaab04&#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/cimb/v1.0/debit/refund`          |

{% openapi src="/files/zfV1wEzQikzJFqW68P8O" path="/direct-debit/merchant/cimb/v1.0/debit/refund" method="post" %}
[openapi3\_0-cimb.json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FZfILARIvmKJJ0G1Wbwo1%2Fopenapi3_0-cimb.json?alt=media\&token=7468638a-18d6-46a9-b4e5-f65db1463097)
{% endopenapi %}

#### Account Unbinding <a href="#pdf-page-us8g8gouoemnqwxgbq7f-account-unbinding" id="pdf-page-us8g8gouoemnqwxgbq7f-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/cimb/v1.0/registration-account-unbinding` |

{% openapi src="/files/zfV1wEzQikzJFqW68P8O" path="/direct-debit/cimb/v1.0/registration-account-unbinding" method="post" %}
[openapi3\_0-cimb.json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FZfILARIvmKJJ0G1Wbwo1%2Fopenapi3_0-cimb.json?alt=media\&token=7468638a-18d6-46a9-b4e5-f65db1463097)
{% 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/archive/snap/direct-debit/cimb-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.
