Kredivo
Last updated
Last updated
DOKU API
Legacy DocumentationDOKU has partenered with various Paylater Providers and one of them is Kredivo to provide Buy Now Pay Later. Learn more about how DOKU can help you integrate with Kredivo here.
Here is the overview of how to integrate with Kredivo :
Obtain payment.url
by generating order
Display Kredivo payment page to customer
Acknowledge payment result
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 | Name of the product item
Allowed chars: |
|
| Mandatory | Price of the product item. Total price and quantity must be match with the |
|
| Mandatory | Quantity of the product item
Allowed chars: |
|
| Mandatory | Item ID No/SKU number on this transaction (new) |
|
| Mandatory | Type / Category of the item in this transaction. |
|
| Mandatory | URL to the product item on merchant site |
|
| Optional | URL to the product item image |
|
| Optional | You can assign the fee to either SELLER or ITEM. If not specified, this will be tied to transaction level |
|
| Optional | This is either the seller Id or item Id |
|
| Mandatory | In IDR currency and without decimal
Allowed chars: |
|
| Mandatory | Merchant URL that will redirected to after the order completed
Allowed chars: |
|
| Optional | URI that the customer is sent to if the customer chooses to cancel the Kredivo payment before completion
Allowed chars: |
|
| Optional | Order expiration time in minutes format
Allowed chars: |
|
| Mandatory | Unique reference number generated by merchant, used as order id in acquirer api. |
|
| Optional | Seller's ID |
|
| Optional | Seller's name |
|
| Optional | Seller's email |
|
| Optional | Seller's URL |
|
| Optional | Seller's Legal ID ( KTP, SIM or Passport Number) |
|
| Optional | Seller's first name |
|
| Optional | Seller's last name |
|
| Optional | Seller's address |
|
| Optional | Seller's address city |
|
| Optional | Seller's address postal code. |
|
| Optional | Seller's phone |
|
| Optional | Seller's country code. ISO 3166-1 alpha-3 |
|
| Mandatory | Customer's first name
Allowed chars: |
|
| Optional | Customer's last name
Allowed chars: |
|
| Mandatory | Customer phone number. Format: |
|
| Mandatory | Customer address
Allowed chars: |
|
| Optional | Billing address of the customer/shopper. Customer's first name |
|
| Optional | Billing address of the customer/shopper. Customer's last name |
|
| Optional | Billing address of the customer/shopper. Customer's address |
|
| Optional | Billing address of the customer/shopper. Customer's city |
|
| Optional | Billing address of the customer/shopper. Customer's postal code |
|
| Optional | Billing address of the customer/shopper. Customer's phone |
|
| Optional | Billing address of the customer/shopper. Customer's country code |
|
| Mandatory | Shipping address of the customer/shopper. Shipping is required for goods (excluding ticket/voucher). Customer's first name |
|
| Optional | Shipping address of the customer/shopper. Customer's last name |
|
| Mandatory | Shipping address of the customer/shopper. Customer's address |
|
| Mandatory | Shipping address of the customer/shopper. Customer's city |
|
| Mandatory | Shipping address of the customer/shopper. Customer's postal code |
|
| Mandatory | Shipping address of the customer/shopper. Customer's phone |
|
| Mandatory | Shipping address of the customer/shopper. Customer's country code |
|
| 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 |
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 | The current payment status
Possible value:
|
|
| Optional | Kredivo payment page URL to display for the customer |
|
| Optional | List of transaction identifier that coming from the acquiring. Merchant can save these data for reference |
|
| Conditional | Date time of URL generated with the format of yyyyMMddHHmmss. |
|
| Conditional | Date time of URL EXPIRED with the format of yyyyMMddHHmmss. |
|
| Conditional | Date time of URL generated with the format of yyyyMMddHHmmss. The generated date uses UTC+7 time. |
|
| Conditional | Date time of URL will be expired in UTC. Use this to set the expiry order on merchant side |
|
| Conditional | Same as the request |
|
| Optional | Same as the request |
Once you have the payment.url
, you can now display the payment page by redirecting your customer to the Kredivo 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.
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: