Backend Integration
Backend Integration to initiate payment
To obtain the payment.url
, you will need to hit this API through your Backend :
Endpoint
Type | Value |
---|---|
HTTP Method | POST |
API endpoint (sandbox) | |
API endpoint (production) |
Request
Here is the sample of request header to obtain payment.url
:
Request Header Explanation
Parameter | Description |
---|---|
| Client ID retrieved from DOKU Back Office |
| Unique random string (max 128 characters) generated from merchant side to protect duplicate request |
| Timestamp request on UTC time in ISO8601 UTC+0 format. It means to proceed transaction on UTC+7 (WIB), merchant need to subtract time with 7. Ex: to proceed transaction on September 22th 2020 at 08:51:00 WIB, the timestamp should be 2020-09-22T01:51:00Z |
| Security parameter that needs to be generated on merchant Backend and placed to the header request to ensure that the request is coming from valid merchant. Please refer to this section to generate the signature |
Here is the sample of request body to obtain payment.url
, you can send a simple request for a basic payment page and you can send the parameter according to your needs :
Body Parameter | Type | Mandatory | Description |
---|---|---|---|
|
| Mandatory | In IDR Currency and without decimal
Max length: |
|
| Mandatory | Generated by merchant to identify the order. Max length: |
|
| Optional | The payment due date of the checkout page in minutes. Default : 60 minutes. Max Length: 6 |
This basic request only could be implement for selected payment method, such as :
Virtual Account
Credit Card
QRIS
Convenience Store
E-money (OVO and Linkaja)
Order object
Body Parameter | Type` | Mandatory | Description |
---|---|---|---|
| number | Mandatory | Order amount in IDR currency and without decimal.
Max length: |
| string | Mandatory | Unique identifier generated by merchant to identify the order. Max length: |
| string | Optional | 3 alphabetic currency code ISO 4217
Min-max Length: |
| string | Conditional, Mandatory for Payment Methods : Jenius. | The "Back to Merchant" button is configured using the URL provided in |
| string | Conditional, Currently only available for payment methods : Indodana | The URL specified for merchant redirection in the event of order cancellation. |
| string | Optional | The URL designated for button "Back to merchant" in result page. |
| string | Optional | Default language shown when redirect to checkout page
Max length: |
| boolean | Mandatory | When set to true, the transaction result page redirects to the callback URL; otherwise, it redirects to the payment result page. |
| boolean | Conditional,
Only applied for payment methods : | This condition is applicable only when the merchant sends this parameter with a "true" value. If the merchant does not include this parameter, sends a "false" value, or if the customer fails to complete the payment, the result page will be displayed in the Checkout. From there, the customer can retry payment or modify their payment options if multiple channels are available. |
| string | Conditional Mandatory for Payment Methods : Akulaku, Kredivo, Indodana | Item ID of the item in this transaction.
Max Length: |
| string | Conditional, Mandatory for Payment Methods : Jenius, Kredivo, Indodana, KKI. | Name of the product item.
Max Length: |
| number | Conditional, Mandatory for Payment Methods : Jenius, Kredivo, Akulaku, Indodana, KKI. | Price of the product item. Total price and quantity must match with the |
| number | Conditional, Mandatory for Payment Methods : Jenius, Kredivo, Akulaku, Indodana, KKI. | Quantity of the product item.
|
| string | Conditional. Mandatory for Payment Methods : Akulaku, Kredivo, Indodana. | SKU of the product item. |
| string | Conditional, Mandatory for Payment Methods : Akulaku, Kredivo, Indodana. | Category of the product item. For Indodana, the category should be based on these list. |
| string | Conditional, Mandatory for Payment Methods : Kredivo and Indodana. | URL to the product item on merchant site. |
| string | Conditional, Mandatory for Payment Methods : Indodana. | URL the image of the product item on merchant site. |
| string | Conditional, Mandatory for Payment Methods : Indodana. | Type of the item in this transaction. |
Payment Object
Body parameter | Type | Mandatory | Description |
---|---|---|---|
| array | optional | Payment method that will shown to users in Checkout Page. If you wish to showcase all available payment methods, simply omit sending this parameter, and all options will be visible. Alternatively, if you prefer to direct users to a specific payment method, include this parameter and specify the desired payment method by filling in its corresponding value. The value are listed here. |
| string | Optional | Possible Value :
|
| number | optional | The payment due date of the checkout page in minutes. Default : 60 minutes. Max Length: 6 |
Customer Object
Body parameter | Type | Mandatory | Description |
---|---|---|---|
| string | Conditional, mandatory to enable tokenized payments (BRI Direct Debit, Allobank, Credit Card tokenization) and Akulaku Paylater. | Unique customer identifier generated by merchant.
Allowed chars: |
| string | Conditional, mandatory for payment methods Jenius, Akulaku, Indodana | Customer name.
Allowed chars: |
| string | Optional | Customer last name.
Max Length: |
| string | Conditional, mandatory for payment method Indodana | Customer email.
Allowed chars: |
| string | Conditional | Customer phone number. Format: |
| string | Conditional, mandatory for payment method Akulaku | Customer address.
Allowed chars: |
| string | Conditional, mandatory for payment method Akulaku | Customer address' post code |
| string | Conditional, mandatory for payment method Akulaku | Customer state or province. |
| string | Conditional, mandatory for payment method Akulaku | Customer address' city |
| string | Optional | 2 alphabetic country code ISO 3166-1
Allowed chars: |
Shipping Address Object
Body Parameter | Type | Mandatory | Description |
---|---|---|---|
| string | Conditional, mandatory for payment method Kredivo and Indodana | Customer's first name used as shipping address |
| string | Optional | Customer's last name used as shipping address. |
| string | Conditional, mandatory for payment method Kredivo and Indodana | Customer's address used as shipping address. |
| string | Conditional, mandatory for payment method Kredivo and Indodana | City of customer's shipping address. |
| string | Conditional, mandatory for payment method Kredivo and Indodana | Postal code of customer's shipping address. |
| string | Conditional, mandatory for payment method Kredivo and Indodana | Customer's phone used as shipping address. |
| string | Conditional, mandatory for payment method Kredivo and Indodana | Country of customer's shipping address. |
Billing Address Object
Body Parameter | Type | Mandatory | Description |
---|---|---|---|
| string | Conditional, mandatory for payment method Indodana | Customer's first name used as billing address |
| string | Conditional, mandatory for payment method Indodana | Customer's last name used as billing address. |
| string | Conditional, mandatory for payment method Indodana | Customer's address used as billing address. |
| string | Conditional, mandatory for payment method Indodana | City of customer's billing address. |
| string | Conditional, mandatory for payment method Indodana | Postal code of customer's billing address. |
| string | Conditional, mandatory for payment method Indodana | Customer's phone used as billing address. |
| string | Conditional, mandatory for payment method Indodana | Country of customer's billing address. |
Additional Info Object
Body parameter | Type | Mandatory | Description |
---|---|---|---|
| number | Optional | The transaction exclusively supports installment tenors as per its current configuration. The allowed values are 0,3,6,12. To hide the "no installment" option, refrain from inputting 0 (zero) in the parameter. |
| string | Conditional, only for payment method DOKU Wallet | Notification url set in this parameter |
| string | Optional | This parameter is intended to override the configured |
Response
Success Response
Type | Value |
---|---|
HTTP Status | 200 |
Response Body Explanation
Body Parameter | Type | Mandatory | Description |
---|---|---|---|
| array | Mandatory | Message will display the result of the request. If there are some errors on your request, they will be diplayed in this parameter. |
| number | Mandatory | Same as the request |
| string | Mandatory | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Unique session ID generated by DOKU |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| number | Optional | Same as the request |
| number | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| boolean | Optional | Same as the request |
| boolean | Optional | Same as the request |
| array | Optional | Payment method that will be displayed on the Checkout Page |
| number | Mandatory | Same as the request |
| string | Mandatory | Token generated by DOKU for the Checkout Page |
| string | Mandatory | Checkout page URL to display for the customer |
| string | Mandatory | Date time of payment page will be expired with the format of |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Unique number generated by DOKU |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
| string | Optional | Same as the request |
Failed Response
Type | Value |
---|---|
HTTP Status | 400 |
List Category
List category can be used as reference. But this is part of payment channel Indodana with mandatory value need to set in order.line_items.category.
No | Category |
---|---|
1 | airlines |
2 | arts-crafts-and-collectibles |
3 | automotive |
4 | baby |
5 | beauty-and-fragrances |
6 | biller |
7 | books-and-magazines |
8 | business-to-business-including-mlm |
9 | charity-and-non-profit |
10 | clothing |
11 | community |
12 | digital-content |
13 | electronics-and-telecom |
14 | entertainment-and-media |
15 | fee |
16 | financial-services-and-products |
17 | financial-services-and-technology |
18 | food-and-beverage |
19 | food-retail-and-service |
20 | games-voucher |
21 | gifts-and-flowers |
22 | government |
23 | health-and-personal-care |
24 | home-and-garden |
25 | hotel-and-travel |
26 | insurance |
27 | marketplace |
28 | nonprofit |
29 | offline-store |
30 | others |
31 | over-the-air |
32 | overseas |
33 | pets-and-animals |
34 | property |
35 | public-services |
36 | religion-and-spirituality |
37 | retail |
38 | services |
39 | sports-and-outdoors |
40 | telco |
41 | ticketing |
42 | toys-and-hobbies |
43 | transportation |
45 | travel |
46 | vehicle-sales |
47 | vehicles-service-and-accessories |
Last updated