Skip to content

错误码 ​

错误示例

json
{
	"code": 409,
	"label": "64",
	"message": "Refund or capture currency does not match the original transaction currency."
}

当请求API失败,NihaoPay会返回一个json格式的错误对象.

NihaoPay的错误对象遵循HTTP状态码,2xx 表示请求成功,你将不会看到错误对象。 4xx 表示请求的信息中有错误,可能是请求参数格式不正确,也可能是未经身份验证的请求或未知的请求端点。5xx 表示NihaoPay服务器存在内部错误,请与我们的技术支持团队tech_support@nihaopay.com 联系。

错误对象 ​

字段描述
code
int
HTTP状态码.
label
string
NihaoPay的错误代码,请提供该字段以便于我们追踪错误信息。
message
string
错误代码对应的错误描述.

错误码列表 ​

codelabelmessage
20000Success 交易成功
40201Transaction failed. Please try again.交易失败,请重试
40202Cardholder input an incorrect card number. 卡号不正确
40203Cardholder's issuing bank prevented the transaction.发卡行拒绝交易
40206Customer input an expired card number. 卡片已过期
40211Customer has insufficient funds available. 账户余额不足
40214Cardholder input an incorrect expiration date. 卡片有效期不正确
40215Cardholder authentication failed. Please verify cardholder's information.验证失败,请检查卡片等信息
40221Cardholder authentication failed. Please verify cardholder's information.验证失败,请检查卡片等信息
40222Card state is incorrect. 卡状态错误
40230The amount exceeds transaction limit placed.订单金额超过限额
40031Transaction reference number must be unique. Please re-submit.商户订单号不能重复,请更换订单号后重新提交
40032This payment channel is restricted. Please contact NihaoPay customer service. 支付方式受限制,请联系NihaoPay
40933Transaction failed. Information submitted in a repeat transaction must match the original attempted transaction exactly. 交易失败,重复提交的订单号请与原订单信息一致
40236Transaction exceeds the cardholder's credit limit. 订单金额超过持卡人的信用卡额度。
42939Too many transactions attempts by cardholder.交易次数过多,卡号被限制
40256Cardholder's chosen payment card is not supported in this Gateway.不支持的卡片
40257Cardholder has not activated online payments with their issuing bank.持卡人未激活在线支付功能
40459Failed. Transaction have refund or chargeback. 交易失败,原交易已经退款或者被拒付,不能撤销
40460Transaction has been cleared, please request refund.交易已清算,不能撤销,请使用退款接口
40261Transaction not found.交易未找到
40262Transaction is not within the acceptance time range. 不在接受时间范围内,消费交易已被关闭,已经超过退款期限。
40263The original transaction failed. You cannot refund, cancel, capture, or release an unsuccessful transaction.原交易支付失败,不能进行退款,撤销或预授权完成等其他管理交易
40964Refund or capture currency does not match the original transaction currency.退款或预授权完成交易币种必须与原交易币种一致
40965Transaction has previously been cancelled.交易已经取消
40966Failed to refund transaction. Transaction has previously been fully refunded.退款失败,交易已经全额退款
40267Failed to refund transaction. Refund amount exceeds original transaction amount or remaining transaction balance .退款失败,退款金额超过原交易金额或账户可用余额不足,不能退款
40268Failed to capture transaction. Transaction has previously been released.预授权完成失败,预授权交易已经取消
40269Failed to capture transaction. Transaction has previously been captured.预授权完成失败,预授权交易已经被捕获扣款,不能重复扣款
40270Failed to capture transaction. Capture amount exceeds authorization amount.预授权完成失败,捕获扣款金额不能超过预授权交易金额的115%
40271Buyer not exist or buyer account info error 付款人账户不存在或者错误
40272Transaction amount is exceed the limit 交易金额超过单笔限额或者超过单日累计总限额
50081Merchant config error 商户配置错误,请联系NihaoPay
50082Merchant unavailable 商户不可用
50083QRcode has expired 二维码已过期
50084Service is not activated for this account 服务未开通
40286Withdrawal amount exceeds account balance 提款金额超过账户余额
40287Withdrawal amount less than the minimum withdrawal amount 提款金额小于最小提款金额
40288Invalid application, it's only available for manually withdrawal merchant 提款申请仅对手工提款的商户开放
40090The field not valid. 请求参数格式不正确
50091Signature error 签名错误
50092The {0} field is required.请求字段不能为空
40493The Exchange rate not found. 未找到汇率
50096Timeout 请求超时
50097Inner error 内部错误
50098Vendor error 渠道系统出错,请稍后再试
50099System error 系统错误,请联系NihaoPay
401301Invalid merchant credentials provided 无效的认证信息,或身份验证失败

最后更新 - 01/16/2025