列出支付尝试
GET
/v1/payments/{uid}/attempts 级联过程全部可见:每次走了哪个渠道、原始拒付码是什么、统一码归到哪类、耗时多少。 排查「为什么这笔没成」只看这个接口就够。
路径参数
uid必填 | string |
响应 200
uid | string | |
attempt_no | integer | |
is_fallback | boolean | 是否由级联触发 |
fallback_reason | string | |
connector_code | string | |
status | pending | success | failed | timeout | timeout 是独立状态:结果未知,由对账补偿,不可直接当失败重试 |
provider_code | string | 渠道原始拒付码 |
unified_code | string | Baton 统一拒付码,跨渠道可比。HTTP 仍是 200——调用成功了,是这笔支付没成。全量取值见「错误码自查」 |
decline_type | soft | hard | '' | hard 永不重试(挂失、止付、风控拒),重试只会加剧风控 |
latency_ms | integer | |
started_at | string<date-time> | |
finished_at | string<date-time> | |
action | object | 需要外部动作时返回,前端据此跳转 |
└type | redirect | qrcode | three_ds_challenge | |
└url | string | |
└expires_at | string<date-time> |
请求
curl -X GET https://api.baton.example/v1/payments/{uid}/attempts \
-H "Authorization: Bearer sk_live_xxx" 响应 · 200
[
{
"uid": "ATT16000217A7F31",
"attempt_no": 1,
"is_fallback": false,
"connector_code": "stripe",
"status": "failed",
"provider_code": "51",
"unified_code": "insufficient_funds",
"decline_type": "soft",
"latency_ms": 420,
"started_at": "2026-11-16T08:12:03Z",
"finished_at": "2026-11-16T08:12:04Z"
},
{
"uid": "ATT16000217A7F32",
"attempt_no": 2,
"is_fallback": true,
"fallback_reason": "soft_decline",
"connector_code": "adyen",
"status": "success",
"unified_code": "",
"decline_type": "",
"latency_ms": 610,
"started_at": "2026-11-16T08:12:04Z",
"finished_at": "2026-11-16T08:12:05Z"
}
]