Trade Status
All codes below are taken from the open-source enum classes and are code-authoritative.
Payment Status — PayStatusEnum
Dictionary: pay_status
| code | Meaning | Description |
|---|---|---|
wait | Pending | No channel / method specified yet |
progress | In progress | Channel and method selected, payment initiated |
success | Success | Payment succeeded |
close | Closed | Payment closed |
cancel | Cancelled | Payment cancelled (voided) |
timeout | Timeout | Intermediate state set after the order times out |
fail | Failed | Payment failed |
Payment State Machine
Trade Status — TradeStatusEnum
Dictionary: trade_status
| code | Meaning | Description |
|---|---|---|
progress | In progress | Trade is being processed |
success | Success | Trade completed successfully |
fail | Failed | Trade failed |
closed | Closed | Trade has been closed |
revoked | Revoked | Trade has been revoked |
exception | Exception | Trade encountered an exception |
Refund Status — PayRefundStatusEnum
Dictionary: pay_refund_status
Refund progress at the payment-order level:
| code | Meaning | Description |
|---|---|---|
no_refund | No refund | No refund operation yet |
refunding | Refunding | A refund is in progress |
partial_refund | Partial refund | Part of the amount has been refunded |
refunded | Fully refunded | The full payment amount has been refunded |
Trade Type — TradeTypeEnum
Dictionary: trade_type
| code | Meaning | Description |
|---|---|---|
pay | Payment | Payment transaction |
cashouts | Withdrawal | Withdrawal transaction |
settle | Settlement | Profit-sharing / settlement transaction |
transfer | Transfer | Transfer transaction |
alloc | Allocation | Allocation transaction |
Normal Pay Order Status — NormalPayOrderStatusEnum
Dictionary: normal_order_status
Business status of the pay_normal_order container:
| code | Meaning | Description |
|---|---|---|
wait_pay | Wait to pay | — |
paid | Paid | — |
failed | Failed | Funds-level failure, distinct from manual closed |
closed | Closed | Manual close / void |
expired | Expired | Closed due to timeout |
Gateway Order Status — GatewayOrderStatusEnum
Dictionary: gateway_order_status
Business status of the pay_gateway_order container:
| code | Meaning | Description |
|---|---|---|
wait_pay | Wait to pay | Pre-ordered, trade not created yet |
paying | Paying | Trade created, channel processing |
paid | Paid | — |
failed | Failed | Funds-level failure, distinct from manual closed |
closed | Closed | — |
expired | Expired | — |
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.
| code | Meaning | Description |
|---|---|---|
processing | Allocating | Accepted, waiting for async channel progress (Alipay/WeChat via query, Douyin via callback) |
success | Success | All receivers allocated successfully |
partial | Partial success | Some receivers succeeded, some failed (terminal state for this allocation, no follow-up) |
fail | Failed | All 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.
| code | Meaning | Description |
|---|---|---|
none | To be allocated | Initialized at order creation, can initiate |
unsupported | Unsupported | Allocation requested but the product does not support it; degraded to normal collection, cannot initiate |
processing | Allocating | — |
done | Allocated | Terminal state |
Allocation Detail Result — AllocDetailResultEnum
Dictionary: alloc_detail_result
Per-receiver allocation result of the alloc_detail table.
| code | Meaning | Description |
|---|---|---|
pending | Pending | Created, channel result not returned yet |
success | Success | — |
fail | Failed | — |
Allocation Receiver Binding Status — AllocReceiverStatusEnum
Dictionary: alloc_receiver_status
Receiver binding lifecycle on the channel side (one-step binding model, no application intermediate state).
| code | Meaning | Description |
|---|---|---|
bound | Bound | Registered on the channel side |
unbound | Unbound | Record kept, can re-bind |
fail | Bind failed | error_msg stored, can fix and re-bind |
Allocation Receiver Type — AllocReceiverTypeEnum
Dictionary: alloc_receiver_type
Receiver account types, used per channel.
| code | Meaning | Description |
|---|---|---|
MERCHANT_ID | Merchant ID | WeChat / Douyin |
PERSONAL_OPENID | Personal openid | WeChat / Douyin |
PERSONAL_SUB_OPENID | Sub-merchant app personal openid | WeChat ISV receiver binding only; openid is scoped to sub_app_id |
USER_ID | Alipay user ID | Starts with 2088, native Alipay userId |
LOGIN_NAME | Alipay login account | Phone / 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.
| code | Meaning |
|---|---|
service_provider | Service provider |
store | Store |
staff | Staff |
store_owner | Store owner |
partner | Partner |
headquarter | Headquarter |
brand | Brand |
distributor | Distributor |
user | User |
supplier | Supplier |
custom | Custom (custom relation name required) |
Transfer Payee Type — TransferPayeeTypeEnum
Dictionary: transfer_payee_type
Transfer payee account types, used per channel.
| code | Meaning | Description |
|---|---|---|
openid | WeChat openid | WeChat only |
user_id | Alipay user ID | Starts with 2088 |
open_id | Alipay open ID | — |
login_name | Alipay login account | Phone / email |
phone | Douyin payee phone | Must match Douyin Pay real-name info, uploaded with sub-app certificate encryption |