API Documentation

Error codes

Payout API std1

Three kinds of result

First decide which kind a response is, then act:

KindMeaningWhat to do
A not processedThe request was not accepted and nothing was recorded; it does not indicate whether this merchant order number was accepted beforecorrect the request and resubmit with the same merchant order number
B rejectedThe order is rejected (final) and this merchant order number is used upto pay out, submit with a new merchant order number; resubmitting the original one returns the same rejection
C unknownSYSTEM_BUSY, and also timeouts, broken connections, HTTP other than 200, a body that is not JSON, a signature that does not verify, a missing signature where one is expectedretry only with the same merchant order number and parameters, or query, until you get success or a B result

Code table

codeClassReturned bySignedmsg textWhat to do
SUCCESS—apply, query, balanceyes—Success (for apply: accepted, not paid yet)
PARAM_ERRORA not processedapply, query, balancesome参数[…]不能指向内网地址
参数[…]格式错误
参数[…]缺失
参数[…]重复
请求体不能超过65536字节
请求体必须是表单
A parameter is missing or malformed, the body is not a form, or it is too large. Fix it per msg and resend with the same order number
MERCHANT_NOT_FOUNDA not processedapply, query, balanceno商户不存在Wrong merchant ID, or this API is not enabled for you. Check the merchant ID and the API address
IP_NOT_ALLOWEDA not processedapply, query, balanceyesIP[…]未授权Your source IP is not on the payout IP list. Give the IP in msg to the operator
SIGN_ERRORA not processedapply, query, balanceyes签名错误Bad signature. Check the string to sign and the key (use the key as text)
RATE_LIMITEDA not processedapply, query, balanceyes请求过于频繁,请稍后重试Too many requests. Wait and resend with the same order number
CURRENCY_NOT_SUPPORTEDA not processedapply, balanceyes不支持的币种This currency is not accepted here. Fix or omit it and resend with the same order number
ORDER_CONFIRM_FAILEDA not processedapplyyes反查订单确认失败Payout confirmation is on and the confirmation lookup to your confirmation URL did not return the success value (it returned the failure value, gave no valid answer or timed out). Not processed and the order number is not used up; check and resubmit with the same order number
MERCHANT_DISABLEDB rejectedapply, queryyes商户不可用或未开通代付
商户未开通代付接口
Merchant disabled, payouts not enabled, or the productId you sent is not opened for you or switched off; for "商户未开通代付接口" (payout API not enabled) the order number is not used up and can be resubmitted once enabled
PAYOUT_SUSPENDEDB rejectedapply, queryyes代付暂停受理Payouts are temporarily suspended
PAYEE_BLOCKEDB rejectedapply, queryyes交易受限Payee restricted
BANK_NOT_SUPPORTEDB rejectedapply, queryyes该银行暂不支持代付This bank is not supported for payouts
ACCOUNT_NOT_SUPPORTEDB rejectedapply, queryyes收款账号类型或格式暂不支持代付This payee account type or format is not supported
AMOUNT_OUT_OF_RANGEB rejectedapply, queryyes单笔金额不在可代付范围内Amount outside the allowed range
NO_AVAILABLE_CHANNELB rejectedapply, queryyes暂无可用代付通道No payout channel available right now
INSUFFICIENT_BALANCEB rejectedapply, queryyes可用余额不足Available balance too low
ORDER_NO_CONFLICT—applyyes商户单号已存在且参数不一致
订单号重复
This order number already exists; nothing was done and the original is unaffected: the parameters differ from the first request, or an existing order number was sent while the payout API is not enabled ("订单号重复"). Query it first; if it really is another payout, submit it with a new merchant order number
ORDER_NOT_FOUND—queryyes订单不存在No such order. This does not prove it was never created: the application may still be on its way
SYSTEM_BUSYC unknownapply, query, balancesome系统繁忙,结果以查单为准System busy, result unknown. Resend with the same order number and parameters, or query

Collection API compat1 (legacy)

The legacy protocol has no error codes, only retCode=FAIL and a retMsg text, worded exactly as in the old system. Common ones:

APIretMsg textReason
Create order请求参数[mchId]不能为空且为数值类型.Merchant ID missing or not digits
Create order商户不存在[mchId=…].Merchant ID does not exist
Create order商户状态不可用[mchId=…].Merchant disabled
Create orderIP[…]不允许访问Source IP not on your collection IP allow-list
Create order参数中含有XSS符号!A value contains characters such as &, < or >
Create order请求参数[…]不能为空.A required parameter is missing
Create order请求参数[…]长度不得大于…位.A parameter is too long
Create order请求参数[notifyUrl]格式错误.The part of notifyUrl before the first ? is not an http or https address with a host (the old system did not check this; we do now)
Create order请求参数[notifyUrl]不能指向内网地址.notifyUrl is an internal or local IP (127.0.0.1, 10.x, 192.168.x and the like); callbacks only go to public addresses
Create order请求参数[amount]必须大于0.Amount is not greater than 0
Create order该商户订单已存在[mchOrderNo=…]Duplicate order number (the original order is not returned)
Create order验证签名不通过.正确签名结果:…,签名串参考:…Bad signature; the message shows the correct signature and the string to sign (the key is replaced by a placeholder)
Create order交易受限Payer restricted
Create order商户没有该产品的支付通道[productId=…,mchId=…]This product is not enabled for you
Create order暂无可用支付通道,请稍后重试No channel available right now
Create order下单金额暂无可用支付通道,请稍后重试No channel available for this amount right now
Create order系统错误System error, try again later
Query orderrequest params[mchId] error.Merchant ID missing or wrong
Query orderrequest params[mchOrderNo or payOrderId] error.Neither mchOrderNo nor payOrderId was sent
Query orderVerify XX pay sign failed.Bad signature
Query order支付订单不存在Order not found (also for orders placed before you switched to this platform)
Query order支付中心系统异常System error, or a value contains characters such as &, < or >
Balance参数[mchId]必填,且为数值类型.mchId=…Merchant ID missing or not digits
Balance验证签名不通过.Bad signature
Balance商户账户不存在或冻结Merchant funds account missing or frozen
Balance支付网关系统异常System error