| 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_BUYER_VIEW_ORDER_PRICE_MODIFY | {"messageType":"ORDER_BUYER_VIEW_ORDER_PRICE_MODIFY","messageBody":"{\"orderId\":\"3305075341149134260\",\"orderNo\":\"PO202605200001\",\"orderStatus\":\"WAITING_FOR_PAYMENT\",\"payStatus\":1,\"totalAmount\":9800,\"shippingFee\":500,\"productAmount\":9300,\"refundAmount\":0,\"refundStatus\":null,\"closeReason\":null,\"tbCreateTime\":\"2026-05-20 15:40:00\",\"payTime\":null}","messagePlatform":1,"timestamp":"1779263269913"} |
| 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"} |
| ORDER_LOGISTICS_CHANGE | {"messageType":"ORDER_LOGISTICS_CHANGE","messageBody":"{\"orderId\":3296711100591134260,\"buyerMemberId\":\"b2b-xxxx\",\"sellerMemberId\":\"b2b-xxxx\",\"currentStatus\":\"announce_sendgoods\",\"msgSendTime\":\"2026-05-20 15:40:00\"}","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 (wait_seller_agree, wait_buyer_send_goods, wait_seller_receive_goods, success) |
| 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, unit: cent |
| refundCarriage | String | Actual refund shipping fee, unit: cent |
| 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 (1), but the received message already shows WAITING_FOR_SENT (4), skipping WAITING_FOR_PAYMENT → WAITING_FOR_PROCURED (3) → WAITING_FOR_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);
}