Indodana
DOKU has partenered with various Paylater Providers and one of them is Indodana to provide Buy Now Pay Later. Learn more about how DOKU can help you integrate with Indodana here.
Integration steps
Here is the overview of how to integrate with Indodana:
Obtain
payment.url
by generating orderDisplay Indodana payment page to customer
Acknowledge payment result
1. Obtain payment.url
by generating order
payment.url
by generating orderTo generate order, you will need to hit this API through your Backend:
API Request
Type | Value |
---|---|
HTTP Method | POST |
API endpoint (Sandbox) |
|
API endpoint (Production) |
|
Here is the sample of request header to generate order:
Request Header Explanation
Parameter | Description |
---|---|
Client-Id | Client ID retrieved from DOKU Back Office |
Request-Id | Unique random string (max 128 characters) generated from merchant side to protect duplicate request |
Request-Timestamp | 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 |
Signature | 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 request body to generate order:
Request Body Explanation
Parameter | Type | Mandatory | Description |
---|---|---|---|
|
| Mandatory | Generated by merchant to identify the order and must unique per request
Allowed chars: |
|
| Mandatory | In IDR currency and without decimal
Allowed chars: |
|
| Mandatory | Name of the product item
Allowed chars: |
|
| Mandatory | Price of the product item. Total price and quantity must match with the |
|
| Mandatory | Quantity of the product item
Allowed chars: |
|
| Mandatory | SKU/item ID of the item in this transaction.
Allowed chars: |
|
| Mandatory | Category of the item in this transaction. Reference for list of enum : |
|
| Optional | URL of the product in the merchant site / platform.
Max Length: |
|
| Optional | URL of the image of the product in the merchant site / platform.
Max Length: |
|
| Optional | Type of the item in this transaction |
|
| Optional | Merchant URL that will redirected to after the order completed
Allowed chars: |
|
| Mandatory | Merchant URL that will redirected if order cancelled
Allowed chars: |
|
| Optional | Order expired time
Format in minute
Max length: |
|
| Mandatory | Unique reference number generated by merchant
Allowed chars: |
|
| Mandatory | Customer name
Allowed chars: |
|
| Optional | Customer name
Allowed chars: |
|
| Mandatory | Customer email address.
Max Length: |
|
| Mandatory | Customer phone number. Format: |
|
| Mandatory | Billing address of the customer for the transaction.
Allowed chars: |
|
| Mandatory | Billing Address first name |
|
| Optional | Billing Address last name |
|
| Mandatory | Billing address of the customer/shopper |
|
| Mandatory | Billing city of the customer/shopper |
|
| Mandatory | Billing postal code of the customer/shopper |
|
| Mandatory | Billing phone of the customer/shopper |
|
| Mandatory | Billing country code of the customer/shopper |
|
| Optional | Shipping address of the customer for the transaction.
Allowed chars: |
|
| Mandatory | Shipping address first name |
|
| Optional | Shipping address last name |
|
| Mandatory | Shipping address of the customer/shopper. shipping is required for goods (excluding ticket/voucher) |
|
| Mandatory | Shipping address city |
|
| Mandatory | Shipping address postal code |
|
| Mandatory | Shipping address phone |
|
| Mandatory | Shipping address country code |
API Response
After hitting the above API request, DOKU will give the response.
Type | Value |
---|---|
HTTP Status | 200 |
Result | SUCCESS |
Response Header Explanation
Parameter | Description |
---|---|
Client-Id | Same as the request |
Request-Id | Same as the request |
Response-Timestamp | Timestamp Response on UTC with format ISO8601 UTC+0 from DOKU |
Signature | Signature generated by DOKU based on the response body |
Here is the sample of response body:
Response Body Explanation
Parameter | Type | Mandatory | Description |
---|---|---|---|
|
| Mandatory | Same as the request |
|
| Mandatory | Same as the request |
|
| Mandatory | Indodana payment page URL to display for the customer |
|
| Mandatory | The current payment status
Possible value:
|
|
| Optional | List of transaction identifier that coming from the acquiring. Merchant can save these data for reference |
|
| Conditional | Same as the request |
|
| Conditional | Date time of Indodana generated with the format of yyyyMMddHHmmss. |
|
| Conditional | Date time of Indodana will be expired with the format of yyyyMMddHHmmss. |
|
| Conditional | Date time of Indodana generated in UTC Format. |
|
| Conditional | Date time of Indodana will be expired in UTC Format. |
2. Display Indodana payment page to customer
Once you have the payment.url
, you can now display the payment page by redirecting your customer to the Indodana payment page.
After the customer completed the payment, they will be redirected to the defined order.callback_url
that you set on the API request.
3. Acknowledge payment result
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:
Additional features
We provide various additional features to suited your needs. Learn more here.
Split Settlement
If you are a platform or a marketplace, you can use this feature to settle the funds to your sellers or partners programmatically, save many operational efforts.
Last updated