Error Codes
Error Code System
The open Payment API (/unipay/*) responds with DaxResult:
{
"code": 0,
"msg": "success",
"data": { }
}| Field | Type | Description |
|---|---|---|
code | int | Status code. 0 = success, non-0 = failure |
msg | string | Message (translated per Accept-Language) |
data | object|null | Business data, usually null on failure |
sign | string | RSA response signature |
resTime | string | Response time (Beijing time) |
reqId | string | Request ID echo |
- Success:
{"code": 0, "msg": "success", ...} - Failure:
{"code": 10506, "msg": "No matching channel found for routing", "data": null}
Error messages support 10 languages (zh-CN / en-US / zh-TW / zh-HK / ja-JP / ko-KR / id-ID / vi-VN / th-TH / ms-MY), selected by the Accept-Language header. code is a numeric category code, independent from the message text — the same text may be thrown with different codes.
HTTP Status Codes
| HTTP Status | Description |
|---|---|
| 200 | Request received, check response body code for result |
| 400 | Invalid request format |
| 401 | Unauthorized (authentication failed) |
| 403 | Forbidden (insufficient permissions) |
| 404 | Endpoint not found |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Error Code Dictionary
CommonCode
| Code | Constant | Description |
|---|---|---|
0 | SUCCESS_CODE | Success |
1 | FAIL_CODE | Failure (generic fallback) |
CommonErrorCode (10000-19999)
| Code | Constant | Description |
|---|---|---|
10401 | AUTHENTICATION_FAIL | Authentication failed (token expired / invalid) |
10404 | SOURCES_NOT_EXIST | Resource not found |
10405 | DATA_NOT_EXIST | Data not found |
10408 | NONCE_MISSING | Nonce missing |
10409 | NONCE_INVALID | Nonce invalid or expired |
10410 | TIMESTAMP_EXPIRED | Request timestamp out of allowed range |
10415 | UN_SUPPORTED_OPERATE | Unsupported operation |
10500 | SYSTEM_ERROR | System error |
10505 | PARSE_PARAMETERS_ERROR | Parameter parsing failed |
10506 | VALIDATE_PARAMETERS_ERROR | Parameter validation failed |
10507 | REPETITIVE_OPERATION_ERROR | Duplicate operation |
10512 | DANGER_SQL | Dangerous SQL detected |
PayErrorCode (20000-29999)
| Code | Constant | Description |
|---|---|---|
20000 | UNCLASSIFIED_ERROR | Unclassified payment error |
20011 | CHANNEL_NOT_EXIST | Payment channel not found |
20012 | METHOD_NOT_EXIST | Payment method not found |
20013 | STATUS_NOT_EXIST | Payment status not found |
20021 | CHANNEL_NOT_ENABLE | Payment channel not enabled |
20022 | METHOD_NOT_ENABLE | Payment method not enabled |
20023 | CONFIG_NOT_ENABLE | Configuration not enabled |
20024 | CONFIG_ERROR | Configuration error |
20025 | CONFIG_NOT_EXIST | Configuration not found |
20030 | UNSUPPORTED_ABILITY | Unsupported payment capability |
20041 | TRADE_NOT_EXIST | Trade not found |
20042 | TRADE_CLOSED | Trade closed |
20043 | TRADE_PROCESSING | Trade processing, do not repeat |
20044 | TRADE_STATUS_ERROR | Trade status error |
20045 | TRADE_FAIL | Trade failed |
20052 | VERIFY_SIGN_FAILED | Signature verification failed |
20060 | AMOUNT_EXCEED_LIMIT | Amount exceeds limit |
20080 | OPERATION_FAIL | Operation failed |
20081 | OPERATION_PROCESSING | Operation processing, do not repeat |
20082 | OPERATION_UNSUPPORTED | Unsupported operation |
20091 | DATA_ERROR | Data error |
Unknown System Error (out-of-range code)
30000 is outside the 20000-29999 range
SYSTEM_UNKNOWN_ERROR is defined in PayErrorCode but its value 30000 exceeds the class's 20000-29999 segment — it stands alone as the "unknown exception" code. Encountering it means an unexpected system-level error occurred; contact the platform to investigate.
| Code | Constant | Description |
|---|---|---|
30000 | SYSTEM_UNKNOWN_ERROR | Unknown system error, unhandled |
Exception Mechanism
Business exceptions are thrown via BizInfoException with both a numeric code and a messageKey:
throw new BizInfoException(PayErrorCode.TRADE_STATUS_ERROR, "pay.order.status.invalid");
throw new BizInfoException("pay.route.error.noMatch");- code determines the response
codefield - messageKey determines the translated
msgtext
Common messageKeys
The full messageKey dictionary lives in daxpay-platform-common/common-i18n/src/main/resources/i18n/{locale}/ (organized per business module, several hundred entries). The table below lists frequently used keys:
| messageKey | Description |
|---|---|
pay.route.error.noMatch | No available payment product matched |
pay.route.error.channelMchEnvMismatch | Channel merchant environment does not match the product's active environment |
pay.error.methodNotExist | Payment method does not exist |
error.common.payStatusNotExist | Payment status not found |
error.common.tradeStatusNotExist | Trade status not found: |
error.common.payRefundStatusNotExist | Pay refund status not found: |
error.common.normalOrderStatusNotExist | Normal pay order status not found: |
error.channel.allocReceiverDuplicate | Alloc receiver already exists (same channel merchant, type and account) |
error.channel.allocReceiverAlreadyBound | Receiver is already bound |
error.channel.allocReceiverNotBound | Only a bound receiver can be unbound |
error.channel.allocReceiverBoundCannotDelete | A bound receiver cannot be deleted, unbind it first |
error.channel.allocReceiverCustomRelationRequired | Custom relation name is required for custom relation type |
error.channel.alipay.transferFailed | Alipay transfer failed: |
error.channel.alipay.allocFailed | Alipay allocation failed: |
error.channel.alipay.allocReceiverBindFailed | Alipay alloc receiver bind failed: |
error.channel.wechat.transferFailed | WeChat transfer failed: |
error.channel.wechat.allocReceiverUnsupportedType | WeChat: unsupported alloc receiver type: |
error.channel.douyin.transferFailed | Douyin transfer failed: |
error.channel.douyin.transferSceneNotConfigured | Douyin: transfer scene not configured |
These are the high-frequency keys; the full allocation/transfer sets (dozens of entries across Alipay, WeChat and Douyin) live in
common-i18n/.../i18n/{locale}/error/channel/{alipay,wechat,douyin}.jsonandchannel.json— not exhaustive here.