Introduction
Same as the callback of shipment orders, ECPay will respond the callback status of return orders whenever the shipping status changes (ServerReplyURL, server-side POST).
On receiving ECPay’s callback, please respond a string 1|OK.
HTTPS Transfer Protocol
- Accept:text/html
- Content Type:application/x-www-form-urlencoded
- HTTP Method:POST
Request Parameter Description
MerchantID String(10)
Provided by ECPay
RtnMerchantTradeNo String(20)
Reverse Logistics Transaction Number.
- The merchant transaction number sent to ECPay when a reverse logistics order is created.
RtnCode Int
Current logistics status
RtnMsg String(200)
Logistics status description
AllPayLogisticsID String(20)
logistics transaction number.
- Please keep the relationship link between ECPay’s logistics transaction number and the merchant transaction number.
GoodsAmount Int
Goods price value.
- Compensation amount for lost goods, numbers only.
UpdateStatusDate String(20)
Logistics status update time.
- Format is: yyyy/MM/dd HH:mm:ss
BookingNote String(50)
Consignment number.
- Returns if logistics type is set to “HOME“.
CheckMacValue String
Checksum.
- Merchant must check CheckMacValue for verification, please refer to the appendix checksum mechanism for more information.
Response Parameter Description
Return plain text value
- Success if value returns 1|OK
- Failure if value returned is not 1|OK
- Correct
1|OK
- Error
0| ErrorMessage
Special Note:
- Merchants must check whether if the CheckMacValue is correct and also have corresponding process to the payment notification accordingly. If not checking the CheckMacValue, it is merchants’ responsibility to bear all loss incurred.
- If merchant’s server does not correctly return 1|OK, ECPay will run a task scheduler to resend the payment notification message to merchant up to 3 times a day. This attempt will continue for 3 days after goods status change. Merchant’s return message do not include any HTML tags, spaces, or other special characters in message returned.