Statuses & Error Codes
Collection order statuses
| Status | Meaning | Terminal |
|---|---|---|
CREATED | Created | |
PROCESSING | Processing | |
SUCCESS | Success | ✓ |
CLOSED | Closed | ✓ |
EXPIRED | Expired | ✓ |
FAILED | Failed | ✓ |
Payout order statuses
| Status | Meaning | Terminal |
|---|---|---|
CREATED | Created | |
FROZEN | Frozen, pending review | |
APPROVED | Approved | |
SUBMITTING | Submitting | |
SUBMITTED | Submitted to channel | |
SUCCESS | Success | ✓ |
FAILED | Failed | ✓ |
REJECTED | Rejected by review/risk | ✓ |
How to judge success
Among terminal statuses, only SUCCESS means paid: for collection, CLOSED/EXPIRED/FAILED received no money; for payout, success also requires reversed_at empty (SUCCESS with a non-empty reversed_at = reversed — treat as refunded). Terminal statuses never change (a payout reversal keeps status unchanged, reflected via reversed_at).
Error codes
The top-level code is a string; "0" means success:
| code | Meaning | Applies to |
|---|---|---|
0 | Success | All |
1001 | Missing/invalid parameters (incl. unsupported currency, unavailable product or channel; payout amount out of range also maps here) | All |
1002 | Signature verification failed | All |
1003 | Timestamp outside the 5-minute window | All |
1004 | Duplicate nonce (possible replay) | All |
1005 | IP not in allowlist | All |
1006 | Merchant / app / key status abnormal | All |
1007 | Rate limited (HTTP 429) | All |
2001 | Order number exists with different key parameters (identical parameters return the original order) | Create |
2002 | Order not found | Query |
2003 | Collection: amount out of range; payout: state does not allow the operation | Collection create / payout |
2006 | bank_code invalid or unsupported (not in the enabled table) | Payout create |
3001 | Insufficient balance | Payout create |
3002 | Risk control / payee blacklist hit | Payout create |
5000 | Internal error (retryable) | All |
How to judge
Judge outcomes by the body code, not the HTTP status alone (auth errors are mostly 401, rate limit 429, conflicts 409, 5000 is 500). Treat any unrecognized code as a system error (retry or contact the platform); never branch business logic on it.