Indomaret
Last updated
Last updated
DOKU API
Legacy DocumentationDOKU has partnered with various partners and one of them is Indomaret to provide O2O Payment. Learn more about how DOKU can help you integrate with Indomaret here.
Here is the overview of how to integrate with O2O:
Generate payment code
Display payment code
Acknowledge payment result
To generate payment code, 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 payment code:
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 of request body to generate payment code:
Request Body Explanation
Parameter | Type | Mandatory | Description |
---|---|---|---|
| string | Mandatory | Generated by merchant to identify the order and must unique per request
Allowed chars: |
| number | Mandatory | In IDR currency and without decimal
Allowed chars: |
| number | Optional | Payment Code expiration time in minutes format
Allowed chars: |
| string | Mandatory | For payment code that can be paid more than once, set this to |
| string | Optional | Additional info that will be display on the acquirer channel when customer do inquiry
Allowed chars: |
| string | Mandatory | Customer name that will be displayed on acquirer channel when do inquiry
Allowed chars: |
| string | Optional | Customer email
Allowed chars: |
| string | Mandatory | Message that will be printed on the receipt as Product Description that given to the customer
Max length: |
| string | Optional | Message that will be printed on the receipt as footer message that given to the customer
Max length: |
| string | Optional | This parameter is intended to override the configured |
API Response
After hitting the above API request, DOKU will give the response.
Type | Value |
---|---|
HTTP Status | 200 |
Result | SUCCESS |
Parameter | Description |
---|---|
Client-Id | Same as the request |
Request-Id | Same as the request |
Request-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 |
---|---|---|---|
| string | Mandatory | Same as the request |
| string | Mandatory | Generated by DOKU that will be used by customer for doing a payment through the Indomaret Store |
| string | Conditional | Date time of Payment Code generated with the format of |
| string | Conditional | Date time of Payment Code will be expired with the format of |
| string | Conditional | Date time of Payment Code generated in UTC format |
| string | Conditional | Date time of Payment Code will be expired in UTC. Use this to set the expiry order on merchant side |
| string | Optional | Page URL that merchant can use to display how customer can complete the payment process through the Indomaret Store |
| string | Optional | URL that merchant can parse to display customized how customer can complete the payment process through the Indomaret Store |
| string | Optional | Same as the request |
Pro Tips
You can also show payment instruction link to your customer by using online_to_offline_info.how_to_pay_page
. If you wish to customize the UI for the payment instruction, you can use the online_to_offline_info.how_to_pay_api
.
You can display the payment code to your customer by using online_to_offline_info.payment_code
that you retrieved from the API response.
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:
We provide various additional features to suited your needs. Learn more here.
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.
Settlement
You can test your payment through our Payment Simulator. Learn more here.