跳至主要内容

Error Codes

Overview​

Error codes are returned through the retCode field in the response body. The retMsg field provides an English error description.


Success Code​

Error CodeIdentifierDescriptionHandling
20000SUCCESSSuccessRequest processed successfully

Common Error Codes​

Error CodeIdentifierDescriptionHandling
40000PARAM_VALID_ERRORParameter validation failedCheck request parameter format and required fields
40001UNAUTHORIZEDUnauthorizedCheck if Authorization header is correct
40002FORBIDDENAccess forbiddenCheck IP whitelist or API permission
40003NOT_FOUNDResource not foundCheck if request path is correct
40004DUPLICATE_REQUESTDuplicate requestUse query API to get existing result

Agreement Error Codes​

Error CodeIdentifierDescriptionHandling
139001001AGREEMENT_NOT_EXISTAgreement does not existCheck agreement number or guide user to re-sign
139001002AGREEMENT_EXPIREDAgreement has expiredGuide user to re-sign
139001003AGREEMENT_UNSIGNEDAgreement has been unsignedGuide user to re-sign
139001004AGREEMENT_SUSPENDEDAgreement is suspendedWait for resume or contact platform
139001005AGREEMENT_STATUS_INVALIDInvalid agreement statusCheck if current status supports this operation
139001006AGREEMENT_TEMPLATE_NOT_EXISTAgreement template does not existContact platform to confirm template configuration
139001007AGREEMENT_ALREADY_SIGNEDAgreement already signedCan directly initiate deduction
139001008SCENE_CODE_MISMATCHScene code mismatchDeprecated - scene code no longer strictly verified
139001009MERCHANT_ID_MISMATCHMerchant ID mismatchCheck if merchant ID matches sign time
139001010USER_ID_MISMATCHUser ID mismatchCheck if user ID matches sign time
139001011AGREEMENT_USER_MISMATCHAgreement user mismatchCheck user-agreement binding
139001012SIGN_URL_EXPIREDSign URL has expiredRe-initiate sign request for new link
139001013AGREEMENT_TYPE_MISMATCHAgreement type mismatchCheck if agreement type (CYCLE/NON_CYCLE/SINGLE) is correct

Transaction Error Codes​

Error CodeIdentifierDescriptionHandling
139002001TRADE_NOT_EXISTTrade does not existCheck if trade number is correct
139002002QUOTA_EXCEEDEDQuota exceededNotify user of insufficient quota; wait for reset
139002003BALANCE_NOT_ENOUGHInsufficient balanceNotify user to top up
139002004TRADE_STATUS_INVALIDInvalid trade statusCheck if current status supports this operation
139002005TRADE_PROCESSINGTrade is processingWait for completion; do not retry

Refund Error Codes​

Error CodeIdentifierDescriptionHandling
139003001REFUND_AMOUNT_EXCEEDRefund amount exceeds refundable amountCheck refunded amount
139003002REFUND_NOT_ALLOWRefund not allowedTrade must be successful to refund
139003003REFUND_PROCESSINGRefund is processingWait for completion
139003004REFUND_NOT_EXISTRefund does not existCheck if refund number is correct

Currency/Amount Error Codes​

Error CodeIdentifierDescriptionHandling
139004001CHAIN_NOT_SUPPORTEDChain network not supportedCheck supported chain list
139004002CURRENCY_NOT_SUPPORTEDCurrency not supportedCheck supported currency list
139004003EXCHANGE_RATE_EXPIREDExchange rate has expiredRe-get exchange rate before retry
139004004INVALID_AMOUNTInvalid amountCheck amount format and precision
139004005AMOUNT_EXCEED_SINGLE_LIMITAmount exceeds single limitLower amount or adjust limit config
139004006AMOUNT_EXCEED_PERIOD_LIMITAmount exceeds period limitWait for reset or adjust limit config
139004007USER_LIMIT_EXCEED_MERCHANTUser limit exceeds merchant limitUser custom limit cannot exceed agreement template limit
139004008EXCEED_MERCHANT_QUOTA_LIMITExceed merchant quota limitContact merchant to adjust quota configuration

Security/Authentication Error Codes​

Error CodeIdentifierDescriptionHandling
139005001RISK_REJECTRejected by risk controlGuide user to active payment with identity verification
139005002INVALID_SIGNATUREInvalid signatureCheck signature algorithm and key
139005003INVALID_TIMESTAMPInvalid timestampRequest timestamp differs >5 minutes from server
139005004KEY_NOT_FOUNDKey not foundContact platform to confirm key configuration

Merchant/User Error Codes​

Error CodeIdentifierDescriptionHandling
139006001MERCHANT_NOT_EXISTMerchant does not existCheck if merchant ID is correct
139006002USER_NOT_EXISTUser does not existCheck if user ID is correct
139006004MERCHANT_SETTLEMENT_CONFIG_ERRORMerchant settlement configuration errorContact platform to check merchant settlement configuration

System Error Codes​

Error CodeIdentifierDescriptionHandling
50000SYSTEM_ERRORSystem errorRetry later or contact support
50001SERVICE_UNAVAILABLEService unavailableSystem maintenance; retry later
50002DOWNSTREAM_ERRORDownstream service errorRetry later or contact support

Error Handling Best Practices​

Retryable Errors​

The following errors may be temporary and can be retried with exponential backoff:

  • 50000 (SYSTEM_ERROR)
  • 50001 (SERVICE_UNAVAILABLE)
  • 50002 (DOWNSTREAM_ERROR)
  • 139002005 (TRADE_PROCESSING)
  • 139003003 (REFUND_PROCESSING)

Non-Retryable Errors​

These errors require business logic handling:

  • 139001001 - 139001013 (Agreement errors)
  • 139002001 - 139002004 (Transaction errors)
  • 139003001 - 139003004 (Refund errors)
  • 139004001 - 139004008 (Amount errors)
  • 139005001 - 139005004 (Security errors)

User-Facing Error Messages​

Error CodeSuggested User Message
BALANCE_NOT_ENOUGHYour account balance is insufficient. Please top up.
QUOTA_EXCEEDEDYou have reached your spending limit for this period.
AGREEMENT_EXPIREDYour payment authorization has expired. Please re-authorize.
RISK_REJECTThis transaction requires additional verification.