BRI Direct Debit
BRI offers 2 payment schemes, which are; 1) Tokenization scheme, and 2) Recurring scheme.
Last updated
BRI offers 2 payment schemes, which are; 1) Tokenization scheme, and 2) Recurring scheme.
Last updated
DOKU API
Legacy DocumentationOverview of integration process with BRI Direct Debit
Card Registration process should be done before payment can be made and processed. Merchant will send card registration request from customer to DOKU. The request includes customer's card number that is registered to customer's BRI account.
Each card/account can only registered/bind to one customer on one merchant. Customer needs to verify OTP and input PIN on BRI page.
Card Registration Flow
Sample of Request Header, Request Body and Response Body
Notes:
Parameter with (*) is mandatory
Paramater without (*) is optional/conditional
Once customer has registered their card through the platform, merchant needs to verify the card. Merchant can hit this API to verify the OTP.
OTP Verification Flow
Sample of Request Header, Request Body and Response Body
Notes:
Parameter with (*) is mandatory
Paramater without (*) is optional/conditional
After customer's card is registered, payment process can be requested by bringing the card token generated in card registration process. After merchant hit payment API, DOKU will deduct customer's balance.
In tokenization scheme, every payment needs to be verified by customer with inputting OTP and/or PIN. In order to do that, merchant needs to bring parameter paymentType : "SALE"
in payment request body.
And as the response, merchant will receive parameter webRedirectUrl
to redirect the customer to merchant's page/platform to complete the payment by inputting OTP and/or PIN. After the payment is completed, merchant then will receive the notification.
In recurring scheme, the payment process will be scheduled. Hence, verification using OTP and/or PIN is not required in every payment. Customers only need to do the verification during card registration process and it will give merchant the authorization to run scheduled payment. In order to do that, merchant needs to bring parameter CHANNEL-ID : "H2H"
in request header andpaymentType : "RECURRING"
in payment request body.
And as the response, merchant will not receive parameter webRedirectUrl
to redirect the customer to merchant's page/platform to complete the payment. Payment request will be directly processed by acquirer and merchant will receive the notification.
Payment Flow
This below payment flow is for tokenization scheme.
Sample of Request Header, Request Body and Response Body
Notes:
Parameter with (*) is mandatory
Paramater without (*) is optional/conditional
After payment is completed, DOKU will send HTTP Notification to merchant's defined Notification URL
. Learn how to handle the notification from DOKU.
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
Sample of Request Header, Request Body and Response Body
Notes:
Parameter with (*) is mandatory
Paramater without (*) is optional/conditional
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.
Sample of Request Header, Request Body and Response Body
Notes:
Parameter with (*) is mandatory
Paramater without (*) is optional/conditional
Environment | Endpoint |
---|---|
Environment | Endpoint |
---|---|
Environment | Endpoint |
---|---|
Environment | Endpoint |
---|---|
Environment | Endpoint |
---|---|
HTTP Method
POST
API Sandbox
API Production
Path
.../direct-debit/core/v1/registration-card-bind
HTTP Method
POST
API Sandbox
API Production
Path
.../direct-debit/core/v1/otp-verification
HTTP Method
POST
API Sandbox
API Production
Path
.../direct-debit/core/v1/debit/payment-host-to-host
HTTP Method
POST
API Sandbox
API Production
Path
.../direct-debit/core/v1/debit/refund
HTTP Method
POST
API Sandbox
API Production
Path
.../direct-debit/core/v1/registration-card-unbind
Format Object: { "bankCardNo": "13763689649826892", "bankCardType": "D", "expiryDate": "0129" } Encrypt using CBC Algorithm Value: encryptedValue + ivString
"5cg2G2719+jxU1RfcGmeCyQrLagUaAWJWWhLpm/mbkiTIrb9qA5kQgAZ4jTsMWOgMxB7lJX6k1hiv5Mq4ltG5g==|GbD2PwzJIgpPijLs14BwZQ=="
Customer id from merchant | Alphanumeric | max length: 64 |
"cust001"
Phone Number Customer | Format: 628238748728423 | min length: 9 max length: 16 | Mandatory
"628238748728423"
Successful
Response Code with format HTTP status code + service code + case code. service code and status code refer to: https://developers.doku.com/getting-started-with-doku-api/response-code/http-status-and-case-code#id-4.-direct-debit | Mandatory | min length: 1 | max length: 7.
"2000700"
Response Description. | min length: 1 | max length: 150
"Successful"
Reference Number
"129260743966"
Redirect URL to Merchant's page/platform for customer to input OTP/PIN | Will show only if CHANNEL-ID is DH
"https://doku.com/direct-debit/ui/binding/2238230713001534401107183161486001168389"
Partner Reference No Purchase Transaction | max: 12 | Mandatory
"INV-0001"
External ID Purchase Transaction | max: 36 |
"REQ-0001"
Reason from customer | max: 255
"Request by Customer"
Partner Refund No| max: 12 | Mandatory
"INV-REF-0001"
Successful
Response Code with format HTTP status code + service code + case code. service code and status code refer to: https://developers.doku.com/getting-started-with-doku-api/response-code/http-status-and-case-code#id-4.-direct-debit | Mandatory | min length: 1 | max length: 7.
"2000700"
Response Description. | min length: 1 | max length: 150
"Successful"
Partner Reference No Purchase Transaction
"Ra7o1bLJAh2oV9eb33129stQc5xFm5s7"
Reference no purchase transaction from DOKU to BRI
"Ra7o1bLJAh2oV9eb33129stQc5xFm5s7"
Refund No from DOKU To BRI
"Ra7o1bLJAh2oV9eb33129stQc5xFm5s7"
Partner Refund No
"Ra7o1bLJAh2oV9eb33129stQc5xFm5s7"
format: yyyy-MM-dd'T'HH:mm:ssXXX
"2024-01-01T09:09:00.123"
format: Value from getTokenB2B2C | max: 2048 | Mandatory
"eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE2OTg4MjI3NTQsImlzcyI6IkRPS1UiLCJjbGllbnRJZCI6IkJSTi0wMjAyLTE2OTAyNzUzNTM3OTgiLCJhY2NvdW50SWQiOiJjZTBhZWIyM2YyMmZhOTgxZWViNTE1MjFmZmNkYmUzNyJ9.QZ2z0p2PoCYbuBSId7LleLqTUwNyNIeM1PUSaV4DwGKO05l7xQ3EbpdAPK62hxKNcczKqQqGY2Om6rzS78s2Tj88dkDD2vl46o3xEPd_plqQW8ayFqS74Z_HcFJfdo-egqFv9rAX7qgiE5AJHSx_hFolET9B3o3Jx82lmQutnXOjYb5gW9PV0FCPIZRWOaXppOSJSVcmTvXZxF0KUID9-2QVmQ5aPZroHjShYJKGyUu-1tCPClD_CbZMCi3TxhKLnI3e2oIoK7VjXEsrJjuil8O1zZTT7_aXAGgTu5UcPCrc0U9_3Nj-wQlEjDpedMVypKAWATWBUVpMo2MAsBRDAw"
Successful
Response Code with format HTTP status code + service code + case code. service code and status code refer to: https://developers.doku.com/getting-started-with-doku-api/response-code/http-status-and-case-code#id-4.-direct-debit | Mandatory | min length: 1 | max length: 7.
"2000500"
Response Description. | min length: 1 | max length: 150
"Successful"
Reference Number
"UNB-0001"
Redirect URL to Authenticate Customer | Will show only if CHANNEL-ID is DH
"https://doku.com/direct-debit/ui/binding/2238230713001534401107183161486001168389"
Partner Reference No Payment | max: 36 | Mandatory
"INV-0001"
OTP sent to customer | min: 6 max: 6 | Mandatory
"111000"
Value should always be otpPayment | Mandatory
"otpPayment"
Successful
Response Code with format HTTP status code + service code + case code. service code and status code refer to: https://developers.doku.com/getting-started-with-doku-api/response-code/http-status-and-case-code#id-4.-direct-debit . | Mandatory | min length: 1 | max length: 7.
2000400
Response Description. | min length: 1 | max length: 150
"Successful"
Reference No from
"GuJNX01wKYMdEGNUJ1k"
Reference No From Partner | max: 64 | Mandatory
"INV-0001"
Successful
Response Code with format HTTP status code + service code + case code. service code and status code refer to: https://developers.doku.com/getting-started-with-doku-api/response-code/http-status-and-case-code#id-4.-direct-debit | Mandatory | min length: 1 | max length: 7.
"2005400"
Response Description. | min length: 1 | max length: 150
"Successful"
Redirect URL to Merchant's page/platform for customer to input OTP/PIN | Will show if CHANNEL-ID is DH or null
"https://app-uat.doku.com/link/283702597342040"
Reference No From Partner
"INV-0001"