ShopeePay
Integration Steps
Here is the overview of how to integrate with ShopeePay :
1. Payment
To do payment using ShopeePay, you will need to hit this API through your backend :
Merchant interface for payment jump App Dana SNAP
Client's current local time in yyyy-MM- ddTHH:mm:ssTZD format
2020-12-21T07:56:11.000ZAlgorithm symmetric signature HMAC_SHA512 (clientSecret, stringToSign)
85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5Unique ID for a partner (DOKU'S Client ID)
821508239190Numeric String. Reference number that should be unique in the same day (request-id)
418075533589Device identification on which the API services are currently being accessed by the end user (customer). Can’t contain symbols
95221conditional. IP address of the end user (customer) using IPv4 format
95221Access Token obtained from Get B2B Token API | Go to here for detailed documentation
Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE2OTgwNTA3NDMsImlzcyI6IkRPS1UiLCJjbGllbnRJZCI6IkJSTi0wMjExLTE2OTY5MTk2NTE5MTgifQ.x-D5VlK6TlVZbLPUSCr-Gbfgh4tnp0QDJmedYFHJGHFjg1c4x39pszU4sLvRhr0Jk0vKdMIzxUZeNhKoesWqDJitnG3kfrNZNsMb_WYUC0tJW91onXzYOKXiTgsHwRNFoWPQHlXIEtT3RQm-SRlCpk_E0gsavgkQn2-kbJEBnPhIs4eKg5IUY9GYi4hRr-_GHsudDl8sd2B5UBB_rHYq36BRmLXH7i7MQADHPsB1ktPVgk3ZWF0jebEjI-lJ88p-omL1vQNvRseXej2HKBa9chGLmPDvXYBQaRmmstHz-tv1boFrHfwsHJebcUec-i3WE1vMvP_3EPXdbqb45N4ciQPartner Reference Number | min length: 1 | max length: 64
INV_20221221_0002Order Valid Up To | format: date
2022-07-20T07:00:00+07:00Payment successful
Invalid Field Format
Invalid Token (B2B)
POST /DOKUTECHNOLOGY/Merchant-Interface/1.0.0/direct-debit/merchant/shopeepay/v1.0/debit/payment-host-to-host HTTP/1.1
Host: virtserver.swaggerhub.com
X-TIMESTAMP: 2020-12-21T07:56:11.000Z
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
X-PARTNER-ID: 821508239190
X-EXTERNAL-ID: 418075533589
X-DEVICE-ID: 95221
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE2OTgwNTA3NDMsImlzcyI6IkRPS1UiLCJjbGllbnRJZCI6IkJSTi0wMjExLTE2OTY5MTk2NTE5MTgifQ.x-D5VlK6TlVZbLPUSCr-Gbfgh4tnp0QDJmedYFHJGHFjg1c4x39pszU4sLvRhr0Jk0vKdMIzxUZeNhKoesWqDJitnG3kfrNZNsMb_WYUC0tJW91onXzYOKXiTgsHwRNFoWPQHlXIEtT3RQm-SRlCpk_E0gsavgkQn2-kbJEBnPhIs4eKg5IUY9GYi4hRr-_GHsudDl8sd2B5UBB_rHYq36BRmLXH7i7MQADHPsB1ktPVgk3ZWF0jebEjI-lJ88p-omL1vQNvRseXej2HKBa9chGLmPDvXYBQaRmmstHz-tv1boFrHfwsHJebcUec-i3WE1vMvP_3EPXdbqb45N4ciQ
Content-Type: application/json
Accept: */*
Content-Length: 391
{
"partnerReferenceNo": "INV_20221221_0002",
"amount": {
"value": "12345678.00",
"currency": "IDR"
},
"urlParam": [
{
"url": "http://www.test.com",
"type": "PAY_RETURN",
"isDeepLink": "N"
}
],
"validUpTo": "2022-07-20T07:00:00+07:00",
"additionalInfo": {
"productCode": "51051000100000000001",
"supportDeepLinkCheckoutUrl": true,
"order": {
"orderTitle": "Demo"
},
"envInfo": {
"sourcePlatform": "IPG",
"terminalType": "SYSTEM"
}
}
}{
"responseCode": "20054000",
"responseMessage": "Successfull",
"referenceNo": "20231011111212800110166670701279462",
"partnerReferenceNo": "INV2023101102",
"webRedirectUrl": "https://pjsp.com/universal?bizNo=REF9"
}2. Acknowledge Payment Notification
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 Feature
Online Refund :
Merchant interface for Refund Dana SNAP
Client's current local time in yyyy-MM- ddTHH:mm:ssTZD format
2020-12-21T07:56:11.000ZAlgorithm symmetric signature HMAC_SHA512 (clientSecret, stringToSign)
85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5Unique ID for a partner (DOKU'S Client ID)
821508239190Numeric String. Reference number that should be unique in the same day (request-id)
418075533589Device identification on which the API services are currently being accessed by the end user (customer). Can’t contain symbols
95221conditional. IP address of the end user (customer) using IPv4 format
95221Access Token obtained from Get B2B Token API
Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE2OTgwNTA3NDMsImlzcyI6IkRPS1UiLCJjbGllbnRJZCI6IkJSTi0wMjExLTE2OTY5MTk2NTE5MTgifQ.x-D5VlK6TlVZbLPUSCr-Gbfgh4tnp0QDJmedYFHJGHFjg1c4x39pszU4sLvRhr0Jk0vKdMIzxUZeNhKoesWqDJitnG3kfrNZNsMb_WYUC0tJW91onXzYOKXiTgsHwRNFoWPQHlXIEtT3RQm-SRlCpk_E0gsavgkQn2-kbJEBnPhIs4eKg5IUY9GYi4hRr-_GHsudDl8sd2B5UBB_rHYq36BRmLXH7i7MQADHPsB1ktPVgk3ZWF0jebEjI-lJ88p-omL1vQNvRseXej2HKBa9chGLmPDvXYBQaRmmstHz-tv1boFrHfwsHJebcUec-i3WE1vMvP_3EPXdbqb45N4ciQOriginal Partner Reference Number | min length: 1 | max length: 64
Testing-123Partner Refund Number | min length: 1 | max length: 64
20230915123232Original External Id | min length: 1 | max length: 36
20230926103436Reason of refund | max length: 256
Cancel OrderRefund successful
Invalid Field Format
Invalid Token (B2B)
POST /DOKUTECHNOLOGY/Merchant-Interface/1.0.0/direct-debit/merchant/shopeepay/v1.0/debit/refund HTTP/1.1
Host: virtserver.swaggerhub.com
X-TIMESTAMP: 2020-12-21T07:56:11.000Z
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
X-PARTNER-ID: 821508239190
X-EXTERNAL-ID: 418075533589
X-DEVICE-ID: 95221
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE2OTgwNTA3NDMsImlzcyI6IkRPS1UiLCJjbGllbnRJZCI6IkJSTi0wMjExLTE2OTY5MTk2NTE5MTgifQ.x-D5VlK6TlVZbLPUSCr-Gbfgh4tnp0QDJmedYFHJGHFjg1c4x39pszU4sLvRhr0Jk0vKdMIzxUZeNhKoesWqDJitnG3kfrNZNsMb_WYUC0tJW91onXzYOKXiTgsHwRNFoWPQHlXIEtT3RQm-SRlCpk_E0gsavgkQn2-kbJEBnPhIs4eKg5IUY9GYi4hRr-_GHsudDl8sd2B5UBB_rHYq36BRmLXH7i7MQADHPsB1ktPVgk3ZWF0jebEjI-lJ88p-omL1vQNvRseXej2HKBa9chGLmPDvXYBQaRmmstHz-tv1boFrHfwsHJebcUec-i3WE1vMvP_3EPXdbqb45N4ciQ
Content-Type: application/json
Accept: */*
Content-Length: 197
{
"originalPartnerReferenceNo": "Testing-123",
"partnerRefundNo": "20230915123232",
"originalExternalId": "20230926103436",
"reason": "Cancel Order",
"refundAmount": {
"value": "12345678.00",
"currency": "IDR"
}
}{
"responseCode": "20058000",
"responseMessage": "Successful",
"refundNo": "Refund-123123",
"partnerRefundNo": "Refund-test123",
"refundAmount": {
"value": "12345678.00",
"currency": "IDR"
},
"refundTime": "2022-07-20T07:00:00+07:00",
"additionalInfo": {
"createTime": "2022-07-20T07:00:00+07:00",
"latestTransactionStatus": "00"
}
}Last updated
Was this helpful?