Shopeepay
Last updated
Last updated
DOKU API
Legacy DocumentationDOKU has partnered with various e-money providers and one of them is ShopeePay to provide E-Money Payment. Learn more about how DOKU can help you integrate with ShopeePay here.
ShopeePay only compatible for Mobile Integration
ShopeePay integration is app-to-app redirection meaning that it will only available for mobile users
Here is the overview of how to integrate with ShopeePay:
Setup Return URL
Create order
Redirect to ShopeePay payment page to complete the payment
Acknowledge payment result
Return URL
Based on the flow, the customers will redirected back to your site after completing the payment on ShopeePay application. Therefore, please setup the return URL
:
Login to DOKU Back Office
Go to Configuration > E-Money
Click Configure button on ShopeePay channel
Input the Payment Return URL
Click Save button
To create an 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 create an order:
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 a sample of request body to create an order:
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 | Merchant URL that will redirected to after the order completed |
|
| Optional | Order expired time. Input value in seconds.
1. Max length: |
|
| 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 |
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:
Parameter | Type | Mandatory | Description |
---|---|---|---|
|
| Mandatory | Same as the request |
|
| Mandatory | Same as the request |
|
| Optional | Merchant identifier by ShopeePay
Max length: |
|
| Optional | Store identifier by ShopeePay
Max length: |
|
| Conditional | Universal link to ShopeePay payment page |
|
| Mandatory | Status of the create order request
Possible value: |
|
| Optional | Same as the request |
2. Redirect to ShopeePay payment page to complete the payment
ShopeePay will display the order details in the Shopee App
Customer will check the payment amount and input ShopeePay PIN / Biometrics to complete the payment
ShopeePay returns the transaction result and the user is redirected to payment successful page. From the payment success page in ShopeePay, user can jump back to the Merchant's app using the return_url
to view their order status.
DOKU will send HTTP Notification to your defined Notification URL
. Learn how to handle the notification from DOKU:
We provide various addtional features to suited your needs. Learn more here.
To request a refund, 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 URL:
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 request a refund:
Parameter | Type | Mandatory | Description |
---|---|---|---|
|
| Mandatory | Invoice number of the transaction that being refunded |
|
| Mandatory | Get from payment notification response |
API Response
After hitting the above API request, DOKU will give the response.
Type | Value |
---|---|
HTTP Status | 200 |
Result | SUCCESS |
Here is the sample response header:
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 :
Parameter | Type | Mandatory | Description |
---|---|---|---|
|
| Mandatory | Same as the request |
|
| Mandatory | Same as the request |
|
| Mandatory | Same as the request |
|
| Mandatory | Merchant invoice number, must unique per request per merchant |
|
| Mandatory | Amount per request per merchant |
|
| Mandatory | Transaction status
Possible value: |
|
| Mandatory | Time Stamp request on UTC time in ISO8601 format |
|
| Mandatory | Request Id from create order request |
|
| Mandatory | Refund status
Possible value: |
|
| Mandatory | Time Stamp request on UTC time in ISO8601 format |
|
| Mandatory | Request Id from create order request |
|
| Mandatory | Additional info |
|
| Mandatory | Merchant identifier |
|
| Mandatory | Merchant identifier |
|
| Mandatory | Transaction data identifier |
|
| Mandatory | Transaction data status |
|
| Mandatory | Transaction message description |
|
| Mandatory | Refund data identifier |
|
| Mandatory | Refund data status |
|
| Mandatory | Refund message description |
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.