错误码
错误响应均为 JSON,包含 error(机器可读码)与 message(人类可读说明)。
HTTP 状态一览
Section titled “HTTP 状态一览”| HTTP | error | 常见场景 |
|---|---|---|
| 400 | BAD_REQUEST | 缺字段、amount 精度错误、notifyUrl 非 HTTPS、代币不支持等 |
| 401 | UNAUTHORIZED | 缺 Authorization、HMAC 错误、时间戳超出 ±5 分钟 |
| 404 | NOT_FOUND | paymentId 不存在 |
| 409 | CONFLICT | 同一商户 orderNo 已存在 |
| 500 | INTERNAL_ERROR | 服务端异常(请稍后重试并联系运维) |
400 Bad Request
Section titled “400 Bad Request”{ "error": "BAD_REQUEST", "message": "Invalid amount" }401 Unauthorized
Section titled “401 Unauthorized”{ "error": "UNAUTHORIZED", "message": "Invalid merchant HMAC signature" }{ "error": "UNAUTHORIZED", "message": "Merchant HMAC authorization is required" }404 Not Found
Section titled “404 Not Found”{ "error": "NOT_FOUND", "message": "Payment not found" }409 Conflict
Section titled “409 Conflict”{ "error": "CONFLICT", "message": "Payment order already exists" }Webhook 投递失败
Section titled “Webhook 投递失败”若你的 notifyUrl 未在 5 秒内返回 2xx,平台将自动重试(最多 8 次,指数退避)。请确保端点幂等;投递详情可通过商户运维渠道查询(不在公开 API 文档范围内)。