On this page, you can find information for accepting DOKU payment methods using our APIs, and build your own payment form to have full control over the look and feel of your checkout page.
Before you begin
These instructions explain how to add payment methods for bank transfers and convenience stores in Indonesia to your existing API-only integration. The API-only integration works the same way for all payment methods. If you haven't done this integration yet, refer to our API-only integration guide.
Before starting your integration:
- Make sure that you have set up your back end implementation.
- Add the payment method in your test Customer Area.
Build your payment form
To make a payment, you need to collect the following shopper details:
||Shopper's first name.|
||Shopper's last name.|
||Shopper's email address.|
We provide logos for the different payment method types which you can use in your payment form. For more information, refer to Downloading logos.
The required fields for different Doku payments are included in the object with the
type that you want to integrate with.
||Kind of payment method|
|Bank Transfer (Permata)||doku_permata_lite_atm||Bank transfer|
|BCA Bank Transfer||doku_bca_va (only available with a local entity)||Bank transfer|
|BNI VA||doku_bni_va||Bank transfer|
|BRI VA||doku_bri_va (only available with a local entity)||Bank transfer|
|CIMB VA||doku_cimb_va||Bank transfer|
|Danamon VA||doku_danamon_va||Bank transfer|
|Mandiri VA||doku_mandiri_va||Bank transfer|
Make a payment
From your server, make a /payments request, specifying:
typeof payment method, for example, doku_alfamart.
paymentMethod.firstName: The shopper's first name.
paymentMethod.lastName: The shopper's last name.
paymentMethod.shopperEmail: The shopper's email address.
amount.value: The amount of the transaction, in minor units without decimals. For example, submit a value of 10000 IDR as 10000.
The /payments response contains:
action: Object containing information about the voucher.
Present the payment result
Because the voucher is an offline payment method, there is no need to handle the redirect back from the acquirer. We send you a webhook informing you about the payment status.
eventCode values you receive with your notification are:
|eventCode||success field||Description||Action to take||resultCode|
|PENDING||true||The voucher reference is successfully created and the transaction is pending.||Present the shopper with the voucher and wait for the payment.||PresentToShopper|
|AUTHORISATION||false||The voucher reference is not successfully generated and the transaction failed.||Cancel the order and inform the shopper that the payment failed.||Error|
|AUTHORISATION||true||The shopper successfully completed the payment.||Inform the shopper that the payment has been successful and proceed with the order.||PresentToShopper|
|OFFER_CLOSED||true||The shopper did not complete the payment before the voucher expired.||Cancel the order and inform the shopper that the payment timed out.||PresentToShopper|
You can customize the expiry date of the virtual bank account (for bank transfers) or the voucher (for convenience store payments). By default, the validity period is 48 hours. To change the validity period, contact the Support Team.
Test and go live
Use our test vouchers and card numbers to simulate the payments.
Check the status of the test payments in your Customer Area, under Transactions > Payments.