Skip to content

Error Codes

Updated: 7/26/26, 9:23:52 PM

Error Code System

DaxPay has two API tiers with slightly different response structures:

Payment API (/unipay/*) — DaxResult:

json
{
  "code": 0,
  "msg": "success",
  "data": { }
}

Management API (/mch/*) — Result:

json
{
  "code": 0,
  "message": "success",
  "data": { }
}
FieldTypePayment APIManagement APIDescription
codeintStatus code. 0 = success, non-0 = failure
msgstringMessage (DaxResult field name)
messagestringTranslated message per Accept-Language (Result field name)
dataobject|nullBusiness data, usually null on failure
signstringRSA response signature (Payment API only)
resTimestringResponse time UTC (Payment API only)
reqIdstringRequest ID echo (Payment API only)
  • 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 StatusDescription
200Request received, check response body code for result
400Invalid request format
401Unauthorized (Accesstoken missing or invalid)
403Forbidden (insufficient permissions)
404Endpoint not found
429Rate limit exceeded
500Internal server error

Error Code Dictionary

CommonCode

CodeConstantDescription
0SUCCESS_CODESuccess
1FAIL_CODEFailure (generic fallback)

CommonErrorCode (10000-19999)

CodeConstantDescription
10401AUTHENTICATION_FAILAuthentication failed (token expired / invalid)
10404SOURCES_NOT_EXISTResource not found
10405DATA_NOT_EXISTData not found
10408NONCE_MISSINGNonce missing
10409NONCE_INVALIDNonce invalid or expired
10410TIMESTAMP_EXPIREDRequest timestamp out of allowed range
10415UN_SUPPORTED_OPERATEUnsupported operation
10500SYSTEM_ERRORSystem error
10505PARSE_PARAMETERS_ERRORParameter parsing failed
10506VALIDATE_PARAMETERS_ERRORParameter validation failed
10507REPETITIVE_OPERATION_ERRORDuplicate operation
10512DANGER_SQLDangerous SQL detected

PayErrorCode (20000-29999)

CodeConstantDescription
20000UNCLASSIFIED_ERRORUnclassified payment error
20011CHANNEL_NOT_EXISTPayment channel not found
20012METHOD_NOT_EXISTPayment method not found
20013STATUS_NOT_EXISTPayment status not found
20021CHANNEL_NOT_ENABLEPayment channel not enabled
20022METHOD_NOT_ENABLEPayment method not enabled
20023CONFIG_NOT_ENABLEConfiguration not enabled
20024CONFIG_ERRORConfiguration error
20025CONFIG_NOT_EXISTConfiguration not found
20030UNSUPPORTED_ABILITYUnsupported payment capability
20041TRADE_NOT_EXISTTrade not found
20042TRADE_CLOSEDTrade closed
20043TRADE_PROCESSINGTrade processing, do not repeat
20044TRADE_STATUS_ERRORTrade status error
20045TRADE_FAILTrade failed
20052VERIFY_SIGN_FAILEDSignature verification failed
20060AMOUNT_EXCEED_LIMITAmount exceeds limit
20080OPERATION_FAILOperation failed
20081OPERATION_PROCESSINGOperation processing, do not repeat
20082OPERATION_UNSUPPORTEDUnsupported operation
20091DATA_ERRORData 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.

CodeConstantDescription
30000SYSTEM_UNKNOWN_ERRORUnknown system error, unhandled

IamErrorCode (21000-21999)

CodeConstantDescription
21014USER_EMAIL_ALREADY_EXISTEDEmail already exists
21015USER_PHONE_ALREADY_EXISTEDPhone already exists
21020USER_INFO_NOT_EXISTSUser not found
21025ROLE_ALREADY_EXISTEDRole already exists
21026ROLE_NOT_EXISTEDRole not found
21027ROLE_ALREADY_USEDRole in use
21029PERMISSION_NOT_EXISTNo access permission
22016USER_PASSWORD_INVALIDInvalid password

Exception Mechanism

Business exceptions are thrown via BizInfoException with both a numeric code and a messageKey:

java
throw new BizInfoException(PayErrorCode.TRADE_STATUS_ERROR, "pay.order.status.invalid");
throw new BizInfoException("pay.route.error.noMatch");
  • code determines the response code field
  • messageKey determines the translated msg/message text

Released under the GNU LGPL v3.0