Skip to content

Error Codes and Solutions

Error Code Reference

All API responses return HTTP Code 200, with business results expressed through a 5-digit response code.

Error Code Categories

Code RangeCategoryDescription
00000SuccessRequest completed successfully
10xxxParameter/Validation ErrorsInvalid parameters or validation failures
20xxxBusiness Logic ErrorsBusiness rule violations or state errors
30xxxData State ErrorsData consistency or version conflicts
40xxxResource Not FoundRequested resource does not exist
50xxxAuthorization/Authentication ErrorsPermission denied or authentication failed
99999System ErrorInternal system error

Complete Error Code List

Success (00000)

CodeMessageDescription
00000SuccessRequest completed successfully

Parameter/Validation Errors (10xxx)

CodeMessageDescription
10001Invalid argumentOne or more arguments are invalid
10002Missing required parameterA required parameter is missing
10003Invalid parameter formatParameter format does not meet requirements
10004Order amount must be greater than 0Order amount is invalid
10005Expiration time cannot be earlier than current timeInvalid expiration time
10006Currency not supportedThe specified currency is not supported
10007Invalid merchantMerchant ID is invalid
10008Amount is not within the allowed rangeAmount exceeds min/max limits
10009Amount precision is not within reasonable rangeToo many decimal places
10010Invalid payment methodPayment method is not valid

Business Logic Errors (20xxx)

CodeMessageDescription
20001Order already existsDuplicate merchant order ID
20002Order already paidOrder has already been paid
20003Order already cancelledOrder has been cancelled
20004Order already closedOrder has been closed
20005Order expiredOrder has expired
20006Order not payableOrder cannot be paid in current state
20007Invalid order status for this operationOperation not allowed for current order status
20008Duplicate paymentPayment already processed
20009Payment amount mismatchPaid amount does not match order amount
20010Refund amount exceededRefund amount exceeds paid amount
20011Insufficient balanceAccount balance insufficient
20012Payment timeoutPayment processing timeout
20013Payment channel unavailablePayment channel is currently unavailable
20014Transaction limit exceededSingle transaction limit exceeded
20015Daily limit exceededDaily transaction limit exceeded
20016Payment method not supportedPayment method not supported for this order
20017Risk control rejectedTransaction rejected by risk control
20018Refund not allowedRefund is not allowed for this order
20019Order cannot be cancelledOrder cannot be cancelled in current state
20020Payment in progressPayment is currently being processed
20021Merchant not activeMerchant account is not active
20022Account frozenAccount has been frozen
20023Account disabledAccount has been disabled
20024KYC verification requiredKYC verification is required
20025Payment method expiredPayment method has expired
20026Card declinedCard payment was declined
20027Network errorNetwork communication error
20028Settlement failedSettlement processing failed
20029Withdrawal not allowedWithdrawal is not allowed
20030Blacklist userUser is blacklisted
20031Address already allocatedDeposit address already allocated
20032Address allocation failedFailed to allocate deposit address
20033Order query failedFailed to query order
20034Deposit order creation failedFailed to create deposit order
20035Insufficient paid amountPaid amount is insufficient
20036Withdrawal failed, please try again laterWithdrawal processing failed
20037Wallet line does not match wallet codeWallet configuration mismatch
20038Asset query failedFailed to query asset balance
20039Asset available not enoughInsufficient available asset balance
20040Failed to estimate miner feeCannot estimate blockchain miner fee
20041Conversion failedCurrency conversion failed
20042Duplicate transfer order numberTransfer order number already exists
20043Wallet code errorInvalid wallet code
20044Network configuration errorBlockchain network configuration error
20045Coin not foundCryptocurrency not found
20046Deposit address not foundDeposit address not found
20047Exchange rate not foundExchange rate not available
20048Third party API errorExternal API error
20049Address allocation failed errorAddress allocation system error
20050Deposit order not foundDeposit order does not exist
20051Deposit order send record not foundDeposit order send record not found

Data State Errors (30xxx)

CodeMessageDescription
30001Data state inconsistentData state is inconsistent
30002Data version conflict, please retryOptimistic lock conflict, retry required
30003Data has been modifiedData has been modified by another process

Resource Not Found Errors (40xxx)

CodeMessageDescription
40001Order not foundOrder does not exist
40002Merchant not foundMerchant does not exist
40003Payment record not foundPayment record does not exist
40004Refund record not foundRefund record does not exist
40005User not foundUser does not exist
40006Account not foundAccount does not exist
40007Channel not foundPayment channel not found
40008Wallet not foundWallet not found
40009Transaction not foundTransaction record not found
40010Address not foundAddress not found
40011Checkout session not foundCheckout session does not exist
40012FX rate not foundForeign exchange rate not available
40013Invalid currencyCurrency code is invalid
40014Invalid parameterParameter is invalid

Authorization/Authentication Errors (50xxx)

CodeMessageDescription
50001Unauthorized accessAuthentication required
50002ForbiddenAccess forbidden
50003Signature verification failedRequest signature is invalid
50004Invalid API keyAPI key is invalid or not found
50005Token expiredAuthentication token has expired
50006Invalid tokenAuthentication token is invalid
50007Access deniedAccess to resource denied
50008Rate limit exceededToo many requests, rate limit exceeded
50009IP not whitelistedRequest IP is not whitelisted

Exchange Payment Errors (501xx)

CodeMessageDescription
50101Failed to connect to exchange APICannot connect to exchange service
50102Failed to create exchange orderExchange order creation failed
50103Failed to query exchange orderExchange order query failed
50104Invalid exchange signatureExchange signature verification failed
50105Exchange order not foundExchange order does not exist
50106Exchange order expiredExchange order has expired
50107Unsupported currency for exchangeCurrency not supported by exchange
50108Failed to process exchange webhookExchange webhook processing failed
50109Failed to close exchange orderCannot close exchange order
50110Failed to fetch exchange certificateExchange certificate fetch failed

System Error (99999)

CodeMessageDescription
99999System error, please try again laterInternal system error occurred

Common Error Troubleshooting

Error: "Invalid signature"

Possible Causes:

  1. JSON format mismatch (formatted vs compressed)
  2. Incorrect API key
  3. Incorrect signature calculation
  4. Timestamp mismatch

Solutions:

  1. Verify JSON is compressed:

    javascript
    // Check if JSON contains line breaks or extra spaces
    console.log('Contains line breaks:', body.includes('\n'));
    console.log('Contains extra spaces:', body.includes('  '));
  2. Check signature components:

    javascript
    console.log('Signature string:', stringToSign.replace(/\n/g, ' | '));
    console.log('Body hash:', bodyHash);
  3. Verify API key:

    • Ensure there are no extra whitespace characters in the API key
    • Check if you're using the correct environment (test vs production)

Error: "Invalid or expired timestamp"

Possible Causes:

  1. Timestamp is not in milliseconds (10 digits instead of 13)
  2. Server time is not synchronized
  3. Request took too long (>5 minutes)

Solutions:

  1. Use milliseconds:

    javascript
    // ✅ Correct (13 digits)
    const timestamp = Date.now(); // 1737554400000
    
    // ❌ Wrong (10 digits)
    const timestamp = Math.floor(Date.now() / 1000); // 1737554400
  2. Synchronize server time:

    bash
    # Linux/macOS
    sudo ntpdate -u pool.ntp.org
    
    # Or enable NTP service
    sudo systemctl enable chronyd
    sudo systemctl start chronyd

Error: "Invalid timestamp format"

Possible Causes:

  • Timestamp length is not 13 digits

Solutions:

javascript
const timestamp = Date.now().toString();
console.log('Timestamp length:', timestamp.length); // Should be 13

Released under the MIT License.