DOKU has partenered with various Paylater Providers and one of them is Akulaku to provide Buy Now Pay Later. Learn more about how DOKU can help you integrate with Akulaku here.
Integration steps
Here is the overview of how to integrate with Akulaku:
Obtain payment.url by generating order
Display Akulaku payment page to customer
Acknowledge payment result
1. Obtain payment.url by generating order
To generate order, you will need to hit this API through your Backend:
API Request
Here is the sample of request header to generate order:
Once you have the payment.url, you can now display the payment page by redirecting your customer to the Akulaku 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:
Currently, Akulaku only accepts refund requests with Full Amount type.
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.
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
order.invoice_number
string
Mandatory
Generated by merchant to identify the order and must unique per request
Allowed chars: alphabetic, numeric, special chars
Max length: 64
order.amount
number
Mandatory
In IDR currency and without decimal
Allowed chars: numeric
Max length: 12
order.line_items.name
string
Mandatory
Name of the product item
Allowed chars: alphabetic, numeric, special chars
Max Length: 255
order.line_items.price
number
Mandatory
Price of the product item. Total price and quantity must match with the order.amount
Allowed chars: numeric
Max Length: 12
order.line_items.quantity
number
Mandatory
Quantity of the product item
Allowed chars: numeric
Max Length: 4
order.line_items.sku
string
Mandatory
SKU of the item in this transaction
order.line_items.category
string
Mandatory
Category of the item in this transaction
order.callback_url
string
Mandatory
Merchant URL that will redirected to after the order completed
Allowed chars: alphabetic, numeric, special chars
payment.merchant_unique_reference
string
Mandatory
Unique reference number generated by merchant, can be same value as order.invoice_number
Allowed chars: alphabetic, numeric, special chars
Max length: 64
customer.id
string
Mandatory
Unique customer identifier generated by merchant
Allowed chars: alphabetic, numeric, special chars
Max Length: 50
customer.name
string
Mandatory
Customer name that will be displayed on acquirer channel when do inquiry
Allowed chars: alphabetic, numeric, special chars
Max length: 64
Customer address
Allowed chars: alphabetic, numeric, special chars
Max Length: 400
customer.city
string
Optional
Customer city, (Please send the following object, even if the value is empty.)
Allowed chars: alphabetic, numeric, special chars
Max Length: 64
customer.state
string
Optional
Customer province, (Please send the following object, even if the value is empty.)
Allowed chars: alphabetic, numeric, special chars
Max Length: 64
customer.postcode
number
Optional
Customer postcode, (Please send the following object, even if the value is empty.)
Allowed chars: numeric
Max Length: 64
HTTP Status
200
Result
SUCCESS
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
order.invoice_number
string
Mandatory
Same as the request
order.amount
number
Mandatory
Same as the request
payment.merchant_unique_reference
string
Mandatory
Same as the request
payment.url
string
Mandatory
Akulaku payment page URL to display for the customer
payment.status
string
Mandatory
The current payment status
Possible value:
PENDING: continue redirect the customer to payment.url.
FAILED: Retry generate order with different order.invoice_number and payment.merchant_unique_reference
payment.identifier
array
Optional
List of transaction identifier that coming from the acquiring. Merchant can save these data for reference
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
order.invoice_number
string
Same as the generate VA request
payment.merchant_unique_reference
string
Mandatory
Unique reference number of merchant's order. generated by merchant. Please note, this reference is unique per request.
payment.identifier
object
Optional
Key Value pairing data
payment.identifier.AKULAKU_UNIQUE_REFERENCE
string
Optional
Get from generate order response body
payment.identifier.ORDER_ID
string
Optional
Get from generate order response body
HTTP Status
200
Result
SUCCESS
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
order.invoice_number
string
Mandatory
Same as the request
`order.amount
number
Mandatory
Same as the request
payment.status
string
Mandatory
Status of the payment.
Possible Value:
1. SUCCESS = If Akulaku approved payment request
2. FAILED = If Akulaku reject payment request.
payment.date
string
Mandatory
Date time of Akulaku will be expired with the format of yyyyMMddHHmmss. The expired date uses UTC+7 time. Use this to set the expiry order on merchant side
payment.merchant_unique_reference
object
Mandatory
Unique reference number of merchant's order. generated by merchant. Please note, this reference is unique per request.
cancel.status
string
Mandatory
Status of Cancel.
Possible Value:
1. SUCCESS = If Cancellation success
2. FAILED = If Cancellation failed.
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
order.invoice_number
string
Mandatory
Invoice number of the transaction that being refunded, same as the invoice when payment
payment.merchant_unique_reference
string
Mandatory
Same as the request
payment.identifier
array
Mandatory
Key Value pairing data
refund.merchant_unique_reference
string
Mandatory
unique reference no of merchant’s order refund, generated by merchant (new)
HTTP Status
200
Result
SUCCESS
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
order.invoice_number
string
Mandatory
Same as the request
order.amount
number
Mandatory
Same as the request
payment.date
string
Mandatory
Time Stamp response on UTC time in ISO8601 format
payment.status
string
Mandatory
Status of the payment
a. REFUNDED = Refund request success / already request
b. FAILED = Transaction already failed
c. CANCELED = Transaction already canceled
d. PENDING = Transaction still pending