# BRI Direct Debit

## BRI Direct Debit

One of DOKU's direct debit partner is BRI. Learn more about integration to BRI Direct Debit here.

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

The overview of integration process with BRI Direct Debit

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

#### Card Registration <a href="#pdf-page-uko8wuulfm2zf2uawkvp-card-registration" id="pdf-page-uko8wuulfm2zf2uawkvp-card-registration"></a>

Merchant can register BRI card/account to customer ID. Each card/account can only registered/bind to one customer on one merchant. Customer need to verify OTP and input PIN on BRI page.

The flow of Card Registration:

<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           | `/wtd-direct-debit-snap-bri/snap/v1.0/registration-card-bind` |

The sample of Request Header, Request Body and Response Body for BRI Direct Debit Card Registration:

{% openapi src="/files/H4YNHHPm3J6i5YckzFLJ" path="/wtd-direct-debit-snap-bri/snap/v1.0/registration-card-bind" method="post" %}
[openapi3\_0-bri.json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FwB2ZoIaZ7o5ltIky28eT%2Fopenapi3_0-bri.json?alt=media\&token=cd818d5c-896f-46e2-8ae5-534fbec1d025)
{% endopenapi %}

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

Once the customer has registered their card through the platform, merchant needs to verify the card. Merchant can hit this API to verify the OTP.

The flow of 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>

| 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           | `/wtd-direct-debit-snap-bri/snap/v1.0/otp-verification`       |

The sample of Request Header, Request Body and Response Body for BRI Direct Debit OTP Verification:

{% openapi src="/files/H4YNHHPm3J6i5YckzFLJ" path="/wtd-direct-debit-snap-bri/snap/v1.0/otp-verification" method="post" %}
[openapi3\_0-bri.json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FwB2ZoIaZ7o5ltIky28eT%2Fopenapi3_0-bri.json?alt=media\&token=cd818d5c-896f-46e2-8ae5-534fbec1d025)
{% endopenapi %}

#### Direct Debit Payment <a href="#pdf-page-uko8wuulfm2zf2uawkvp-direct-debit-payment" id="pdf-page-uko8wuulfm2zf2uawkvp-direct-debit-payment"></a>

This API is used for payment of transaction based on the card number in the card token obtained from the Card Registration/Binding process. After merchant hit this Payment API, DOKU will deduct the customer's balance.

The flow of Direct Debit Payment:

<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%252F6bWp7CkwSGqXQRkFxm4C%252F24112023%2520Checkout_SNAP%2520payment%2520-%2520CIMB.png%3Falt%3Dmedia%26token%3Debe03ea2-0495-44c6-9f09-b0acc6bcd422&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=289de57f&#x26;sv=1" alt=""><figcaption></figcaption></figure>

| 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           | `/wtd-direct-debit-snap-bri/snap/v1.0/debit/payment-host-to-host` |

The sample of Request Header, Request Body and Response Body for BRI Direct Debit Payment:

{% openapi src="/files/H4YNHHPm3J6i5YckzFLJ" path="/wtd-direct-debit-snap-bri/snap/v1.0/debit/payment-host-to-host" method="post" %}
[openapi3\_0-bri.json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FwB2ZoIaZ7o5ltIky28eT%2Fopenapi3_0-bri.json?alt=media\&token=cd818d5c-896f-46e2-8ae5-534fbec1d025)
{% endopenapi %}

#### Direct Debit Payment Notification <a href="#pdf-page-uko8wuulfm2zf2uawkvp-direct-debit-payment-notification" id="pdf-page-uko8wuulfm2zf2uawkvp-direct-debit-payment-notification"></a>

After the payment is done by the customer, DOKU will send **HTTP Notification** to merchant's 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-uko8wuulfm2zf2uawkvp-additional-feature" id="pdf-page-uko8wuulfm2zf2uawkvp-additional-feature"></a>

#### Online Direct Debit Refund <a href="#pdf-page-uko8wuulfm2zf2uawkvp-online-direct-debit-refund" id="pdf-page-uko8wuulfm2zf2uawkvp-online-direct-debit-refund"></a>

This endpoint is used to create refund requests for previously successful payments. Refunds can be made in full or partial amounts. Merchant can refund the transaction to DOKU. Hit this API to refund the transaction. Currently DOKU Support Full Refund.

The flow of Direct Debit Refund:

<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>

| 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           | `/wtd-direct-debit-snap-bri/snap/v1.0/refund`                 |

The sample of Request Header, Request Body and Response Body for BRI Direct Debit Refund:

{% openapi src="/files/H4YNHHPm3J6i5YckzFLJ" path="/wtd-direct-debit-snap-bri/snap/v1.0/debit/refund" method="post" %}
[openapi3\_0-bri.json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FwB2ZoIaZ7o5ltIky28eT%2Fopenapi3_0-bri.json?alt=media\&token=cd818d5c-896f-46e2-8ae5-534fbec1d025)
{% endopenapi %}

#### Card Registration Unbinding <a href="#pdf-page-uko8wuulfm2zf2uawkvp-card-registration-unbinding" id="pdf-page-uko8wuulfm2zf2uawkvp-card-registration-unbinding"></a>

This API is used to delete customer's card data in DOKU.

**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           | `/wtd-direct-debit-snap-bri/snap/v1.0/registration-card-unbind` |

The sample of Request Header, Request Body and Response Body for BRI Direct Debit Card Registration Unbinding:

{% openapi src="/files/H4YNHHPm3J6i5YckzFLJ" path="/wtd-direct-debit-snap-bri/snap/v1.0/registration-card-unbind" method="post" %}
[openapi3\_0-bri.json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FwB2ZoIaZ7o5ltIky28eT%2Fopenapi3_0-bri.json?alt=media\&token=cd818d5c-896f-46e2-8ae5-534fbec1d025)
{% 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/bri-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.
