应答码
接口在业务成功、业务异常或系统异常时,会返回统一格式的应答。响应体中的 result.code 为应答码,业务判断请以 code 为准,勿依赖 msg 文案。
响应中的 result 结构
json
{
"result": {
"code": "S0000",
"msg": "Success"
},
"data": { ... }
}| 字段 | 类型 | 说明 |
|---|---|---|
result.code | string | 应答码,见下表 |
result.msg | string | 应答描述(可能随版本变化,业务判断请以 code 为准) |
应答码列表
| 应答码 | 说明 |
|---|---|
S0000 | Success(成功) |
B0001 | Duplicate merchant order(商户订单号重复) |
B0002 | The selected payment method is unavailable(当前支付方式不可用) |
B0003 | Invalid payment state(支付状态无效) |
C0000 | Invalid request(请求无效) |
C0001 | Missing required parameter(缺少必填参数) |
C0002 | Invalid parameter format(参数格式错误) |
C0003 | Invalid signature(签名无效) |
C0004 | Unauthorized merchant(商户未授权) |
C0005 | Order number not found(订单号不存在) |
P0001 | Payment is processing.(订单已创建成功,支付处理中) |
P0002 | Order status is invalid.(订单状态无效) |
P0003 | Insufficient balance.(余额不足) |
P0004 | Payment was cancelled.(支付已取消) |
P0005 | Merchant or payment configuration is invalid.(商户或支付配置无效) |
P0006 | Payment was rejected.(支付被拒绝) |
E0000 | Internal server error(系统内部错误) |
E0001 | External system error(外部系统错误) |