Skip to content

Trade Status ​

Updated: 10/15/26, 5:44:21 PM

All codes below are taken from the open-source enum classes and are code-authoritative.

Payment Status — PayStatusEnum ​

Dictionary: pay_status

codeMeaningDescription
waitPendingNo channel / method specified yet
progressIn progressChannel and method selected, payment initiated
successSuccessPayment succeeded
closeClosedPayment closed
cancelCancelledPayment cancelled (voided)
timeoutTimeoutIntermediate state set after the order times out
failFailedPayment failed

Payment State Machine ​

Trade Status — TradeStatusEnum ​

Dictionary: trade_status

codeMeaningDescription
progressIn progressTrade is being processed
successSuccessTrade completed successfully
failFailedTrade failed
closedClosedTrade has been closed
revokedRevokedTrade has been revoked
exceptionExceptionTrade encountered an exception

Refund Status — PayRefundStatusEnum ​

Dictionary: pay_refund_status

Refund progress at the payment-order level:

codeMeaningDescription
no_refundNo refundNo refund operation yet
refundingRefundingA refund is in progress
partial_refundPartial refundPart of the amount has been refunded
refundedFully refundedThe full payment amount has been refunded

Trade Type — TradeTypeEnum ​

Dictionary: trade_type

codeMeaningDescription
payPaymentPayment transaction
cashoutsWithdrawalWithdrawal transaction
settleSettlementProfit-sharing / settlement transaction
transferTransferTransfer transaction
allocAllocationAllocation transaction

Normal Pay Order Status — NormalPayOrderStatusEnum ​

Dictionary: normal_order_status

Business status of the pay_normal_order container:

codeMeaningDescription
wait_payWait to pay—
paidPaid—
failedFailedFunds-level failure, distinct from manual closed
closedClosedManual close / void
expiredExpiredClosed due to timeout

Gateway Order Status — GatewayOrderStatusEnum ​

Dictionary: gateway_order_status

Business status of the pay_gateway_order container:

codeMeaningDescription
wait_payWait to payPre-ordered, trade not created yet
payingPayingTrade created, channel processing
paidPaid—
failedFailedFunds-level failure, distinct from manual closed
closedClosed—
expiredExpired—

Allocation Order Status — AllocOrderStatusEnum ​

Dictionary: alloc_order_status

Allocation status of the alloc_order table — the lifecycle of a single allocation. Single-shot semantics: initiating completes the allocation; there is no "processing done, pending finalize" intermediate state.

codeMeaningDescription
processingAllocatingAccepted, waiting for async channel progress (Alipay/WeChat via query, Douyin via callback)
successSuccessAll receivers allocated successfully
partialPartial successSome receivers succeeded, some failed (terminal state for this allocation, no follow-up)
failFailedAll receivers failed

Trade Allocation Status — TradeAllocStatusEnum ​

Dictionary: trade_alloc_status

Values of pay_trade.alloc_status — the allocation lifecycle of the original payment trade. null means a normal (non-allocation) order; no enum value represents that.

codeMeaningDescription
noneTo be allocatedInitialized at order creation, can initiate
unsupportedUnsupportedAllocation requested but the product does not support it; degraded to normal collection, cannot initiate
processingAllocating—
doneAllocatedTerminal state

Allocation Detail Result — AllocDetailResultEnum ​

Dictionary: alloc_detail_result

Per-receiver allocation result of the alloc_detail table.

codeMeaningDescription
pendingPendingCreated, channel result not returned yet
successSuccess—
failFailed—

Allocation Receiver Binding Status — AllocReceiverStatusEnum ​

Dictionary: alloc_receiver_status

Receiver binding lifecycle on the channel side (one-step binding model, no application intermediate state).

codeMeaningDescription
boundBoundRegistered on the channel side
unboundUnboundRecord kept, can re-bind
failBind failederror_msg stored, can fix and re-bind

Allocation Receiver Type — AllocReceiverTypeEnum ​

Dictionary: alloc_receiver_type

Receiver account types, used per channel.

codeMeaningDescription
MERCHANT_IDMerchant IDWeChat / Douyin
PERSONAL_OPENIDPersonal openidWeChat / Douyin
PERSONAL_SUB_OPENIDSub-merchant app personal openidWeChat ISV receiver binding only; openid is scoped to sub_app_id
USER_IDAlipay user IDStarts with 2088, native Alipay userId
LOGIN_NAMEAlipay login accountPhone / email, native Alipay loginName

Allocation Relation Type — AllocRelationTypeEnum ​

Dictionary: alloc_relation_type

Relation between the receiver and the allocating merchant (required when binding receivers on WeChat/Douyin). Codes are unified lowercase on the platform; the channel adapter maps them to channel-native styles.

codeMeaning
service_providerService provider
storeStore
staffStaff
store_ownerStore owner
partnerPartner
headquarterHeadquarter
brandBrand
distributorDistributor
userUser
supplierSupplier
customCustom (custom relation name required)

Transfer Payee Type — TransferPayeeTypeEnum ​

Dictionary: transfer_payee_type

Transfer payee account types, used per channel.

codeMeaningDescription
openidWeChat openidWeChat only
user_idAlipay user IDStarts with 2088
open_idAlipay open ID—
login_nameAlipay login accountPhone / email
phoneDouyin payee phoneMust match Douyin Pay real-name info, uploaded with sub-app certificate encryption