| messageType | messageBody |
|---|---|
| ORDER_CREATE | {"messageType":"ORDER_CREATE","messageBody":"{\"orderId\":\"3305075341149134260\",\"orderNo\":\"PO202605200001\",\"orderStatus\":\"WAITING_FOR_PAYMENT\",\"payStatus\":1,\"totalAmount\":10000,\"shippingFee\":500,\"productAmount\":9500,\"refundAmount\":0,\"refundStatus\":null,\"closeReason\":null,\"tbCreateTime\":\"2026-05-20 15:40:00\",\"payTime\":null}","messagePlatform":1,"timestamp":"1779263269913"} |
| ORDER_CANCEL | {"messageType":"ORDER_CANCEL","messageBody":"{\"orderId\":\"3305075341149134260\",\"orderNo\":\"PO202605200001\",\"orderStatus\":\"CANCEL\",\"payStatus\":1,\"totalAmount\":10000,\"shippingFee\":500,\"productAmount\":9500,\"refundAmount\":0,\"refundStatus\":null,\"closeReason\":\"buyer_cancel\",\"tbCreateTime\":\"2026-05-20 15:40:00\",\"payTime\":\"2026-05-20 15:41:00\"}","messagePlatform":1,"timestamp":"1779263269913"} |
| ORDER_PAY_SUCCESS | {"messageType":"ORDER_PAY_SUCCESS","messageBody":"{\"orderId\":\"3305075341149134260\",\"orderNo\":\"PO202605200001\",\"orderStatus\":\"WAITING_FOR_SENT\",\"payStatus\":2,\"totalAmount\":10000,\"shippingFee\":500,\"productAmount\":9500,\"refundAmount\":0,\"refundStatus\":null,\"closeReason\":null,\"tbCreateTime\":\"2026-05-20 15:40:00\",\"payTime\":\"2026-05-20 15:41:00\"}","messagePlatform":1,"timestamp":"1779263269913"} |
| ORDER_SEND | {"messageType":"ORDER_SEND","messageBody":"{\"logisticsList\":[{\"logisticsBillNo\":\"79012557011487\",\"logisticsCompanyName\":\"中通快递(ZTO)\",\"logisticsCompanyNo\":\"ZTO\",\"logisticsOrderGoods\":[{\"description\":\"规格: 毓婷早孕卡; \",\"orderId\":3308948328441134260,\"orderItemId\":3308948328441134260,\"productName\":\"毓婷验孕棒早早孕快速检测笔检测试纸检测卡排卵全系女用医用测孕\",\"quantity\":1.0,\"unit\":\"瓶\"}],\"orderEntryIds\":\"3308948328441134260\",\"receiver\":{\"encrypt\":\"CN\",\"receiverAddress\":\"姚园寺巷99号99仓#JP4578286号\",\"receiverCity\":\"杭州市\",\"receiverCityCode\":\"330100\",\"receiverCounty\":\"上城区\",\"receiverCountyCode\":\"330102\",\"receiverMobile\":\"18158354927\",\"receiverName\":\"test\",\"receiverProvince\":\"浙江省\",\"receiverProvinceCode\":\"330000\"},\"sendGoods\":[{\"goodName\":\"毓婷验孕棒早早孕快速检测笔检测试纸检测卡排卵全系女用医用测孕\",\"quantity\":\"1.0\",\"unit\":\"瓶\"}],\"sender\":{\"encrypt\":\"CN\",\"senderAddress\":\"常平镇 元江元社前村聚富三街18-401\",\"senderCity\":\"东莞市\",\"senderCityCode\":\"441900\",\"senderMobile\":\"15338002797\",\"senderName\":\"李成龙\",\"senderPhone\":\"\",\"senderProvince\":\"广东省\",\"senderProvinceCode\":\"440000\"},\"status\":\"SIGN\"}],\"orderId\":\"3308948328441134260\",\"orderNo\":\"1384552682458448150\",\"orderStatus\":\"SENT\",\"payStatus\":2,\"payTime\":1781684003000,\"productAmount\":245,\"refundAmount\":0,\"refundStatus\":0,\"shippingFee\":220,\"tbCreateTime\":1781680683000,\"totalAmount\":465}","messagePlatform":1,"timestamp":"1781784534559"} |
| ORDER_BUYER_VIEW_ORDER_BUYER_REFUND | {"messageType":"ORDER_BUYER_VIEW_ORDER_BUYER_REFUND","messageBody":"{\"refundId\":\"TQxxxxxxxxxxxx\",\"orderId\":\"3296711100591134260\",\"status\":\"wait_seller_agree\",\"applyPayment\":\"10000\",\"applyCarriage\":\"500\",\"applyReason\":\"不想要了\",\"applyReasonId\":1,\"refundPayment\":\"10000\",\"refundCarriage\":\"500\",\"refundGoods\":false,\"onlyRefund\":true,\"goodsReceived\":true,\"goodsStatus\":2,\"disputeType\":1,\"buyerMemberId\":\"b2b-xxxx\",\"sellerMemberId\":\"b2b-xxxx\",\"gmtApply\":\"2026-05-20T15:40:00\",\"productName\":\"商品名称\",\"orderEntryIdList\":\"123456,789012\"}","messagePlatform":1,"timestamp":"1779263269913"} |
{
"messageType": "ORDER_CREATE",
"messageBody": "{\"orderId\":\"3305075341149134260\",\"orderNo\":\"PO202605200001\",\"orderStatus\":\"WAITING_FOR_PAYMENT\",\"payStatus\":1,\"totalAmount\":10000,\"shippingFee\":500,\"productAmount\":9500,\"refundAmount\":0,\"refundStatus\":null,\"closeReason\":null,\"tbCreateTime\":\"2026-05-20 15:40:00\",\"payTime\":null}",
"messagePlatform": 1,
"timestamp": "1779954399894"
}| Field | Type | Description |
|---|---|---|
| orderId | String | 1688 order ID |
| orderNo | String | Xport internal order number |
| orderStatus | String | Order status, PoolOrderStatusEnum name (WAITING_FOR_PAYMENT, WAITING_FOR_SENT, SENT, CANCEL) |
| payStatus | Integer | Payment status |
| totalAmount | Integer | Total amount payable, unit: cent |
| shippingFee | Integer | Shipping fee, unit: cent |
| productAmount | Integer | Product total amount, unit: cent |
| refundAmount | Integer | Refund amount, unit: cent |
| refundStatus | Integer | Refund status (null when no refund) |
| closeReason | String | Close reason (only available for cancel messages) |
| tbCreateTime | String | 1688 order creation time |
| payTime | String | Payment time (null when not yet paid) |
| Field | Type | Description |
|---|---|---|
| refundId | String | Refund ID |
| orderId | String | 1688 order ID |
| status | String | Refund status (waitselleragree,waitbuyermodify,waitbuyersend,waitsellerreceive,refundsuccess,refundclose) |
| applyPayment | String | Buyer applied refund amount, unit: cent |
| applyCarriage | String | Applied refund shipping fee, unit: cent |
| applyReason | String | Refund reason |
| applyReasonId | Integer | Refund reason ID |
| refundPayment | String | Actual refund amount |
| refundCarriage | String | Actual refund shipping fee |
| refundGoods | Boolean | Whether return goods is required |
| onlyRefund | Boolean | Whether it is refund only (no return) |
| goodsReceived | Boolean | Whether buyer has received goods |
| goodsStatus | Integer | Goods status: 1-not received, 2-received, 3-returned |
| disputeType | Integer | Dispute type: 1-in-sale refund, 2-after-sale refund |
| buyerMemberId | String | Buyer member ID |
| sellerMemberId | String | Seller member ID |
| gmtApply | String | Refund apply time |
| productName | String | Product name |
| orderEntryIdList | String | Order entry ID list (comma separated) |
Note: The refund message body may contain additional internal fields. The fields listed above are the primary business fields.
#Request signature parameters
Base = "{messageBody}"
Secret = "{AccessSecret}"
#Signature algorithm
HMAC-SHA256
#Generate signature
Authorization = HEX_ENCODE(HMAC-SHA256(Base, Secret));timestamp (millisecond-level timestamp at the time of push) in the outer message payload. It is recommended that the consumer maintain a lastTimestamp for each order locally. Upon receiving a message, compare:timestamp <= lastTimestamp, treat it as a stale/outdated message and discard it.timestamp > lastTimestamp, process the message and update lastTimestamp.Pseudocode:
if (message.timestamp <= orderLocalState.lastTimestamp) {
// stale message, skip
return;
}
// process message
orderLocalState.update(message);
orderLocalState.lastTimestamp = message.timestamp;WAITING_FOR_PAYMENT, but the received message already shows SENT , skipping WAITING_FOR_PAYMENT → WAITING_FOR_SENT → SENT.Pseudocode:
if (!isExpectedNextState(localStatus, message.orderStatus)) {
// status jump detected → compensation query
fullOrder = openApi.queryOrderDetail(message.orderId);
orderLocalState.reconcile(fullOrder);
} else {
orderLocalState.update(message);
}orderId + messageType + timestamp as a composite deduplication key.Pseudocode:
String deduplicationKey = message.orderId + ":" + message.messageType + ":" + message.timestamp;
if (redis.setnx(deduplicationKey, "1", expireTime=24h)) {
// first time → process normally
processMessage(message);
} else {
// duplicate → skip
log.info("Duplicate message received, skip: {}", deduplicationKey);
}