Introduction
Merchants may use this API to query for an order.
API URLs
- Stage:https://logistics-stage.ecpay.com.tw/Helper/QueryLogisticsTradeInfo/V3
- Production:https://logistics.ecpay.com.tw/Helper/QueryLogisticsTradeInfo/V3
HTTPS Transfer Protocol
- Accept:text/html
- Content Type:application/x-www-form-urlencoded
- HTTP Method:POST
Request Parameter Description
MerchantID String(10)
Required
Provided by ECPAY
AllPayLogisticsID String(20)
logistics transaction number.
- Either this parameter or MerchantTradeNo is required.
MerchantTradeNo String(20)
- 1. Merchant transaction numbers are unique and cannot be reused.
- 2. Alphanumeric string.
- 3. Either this parameter or AllPayLogisticsID is required.
TimeStamp Int
Required
- Convert the current time to UnixTimeStamp (see example) It’s used to verify the time interval for this interface.
- The ECPAY verification time interval is tentatively scheduled to be valid for 3 minutes. Once time runs out, the interface will expire.
- Reference link: http://www.epochconverter.com/.
PlatformID String(10)
- Provided by ECPAY, this parameter is used by Platform. General merchant should set this to null.
- When used by Platform, please use the MerchantID bound with merchant account
CheckMacValue String
Required
Checksum.
- Please refer to the appendix for more information on checksum mechanism.
Response Parameter Description
MerchantID String(9)
MerchantTradeNo String(20)
AllPayLogisticsID String(20)
GoodsAmount Int
Goods price value.
- Compensation amount for lost goods, numbers only.
LogisticsType String(20)
The logistics method selected by member.
- Please refer to the logistics methods list.
HandlingCharge Int
CollectionChargeFee Int
TradeDate String(20)
Order creation time.
- Format is :yyyy/MM/dd HH:mm:ss
LogisticsStatus String(8)
Logistics status,
- Please refer to the logistics status code list.
GoodsName String(200)
ShipmentNo String(8)
Delivery number.
- When logistics type is set to “CVS“, a value will be returned.
BookingNote String(50)
Consignment number.
- When logistics type is set to “HOME“, a value will be returned.
CheckMacValue String
Checksum.
- Please refer to the appendix for more information on checksum mechanism.
Response Messages Sample:
The order result will be directly sent to the website, shown as “parameter = value“, and separated with a “&“.
MerchantID=XXX&MerchantTradeNo=XXX&AllPayLogisticsID=XXX&GoodsAmount=XXX &LogisticsType=XXX&HandlingCharge=XXX&TradeDate=XXX&LogisticsStatus=XXX&GoodsName=XXX &CheckMacValue=XXX