{
"id": "<string>",
"amount_total": 123,
"currency": "<string>",
"payment_status": "pending",
"created": 123,
"expires_at": 123,
"url": "<string>",
"line_items": [
{
"price_data": {
"currency": "<string>",
"unit_amount": 2,
"product_data": {
"name": "<string>",
"description": "<string>"
}
},
"quantity": 2
}
],
"tax_amount": 123,
"shipping_amount": 123,
"exchange_rate": "<string>",
"target_currency": "<string>",
"target_amount_total": 123,
"rate_locked_at": 123,
"subscription_id": "<string>",
"invoice_id": "<string>",
"metadata": {}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"decline_code": "<string>",
"request_log_url": "<string>",
"charge": "<string>"
},
"request_id": "<string>",
"timestamp": 123
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"decline_code": "<string>",
"request_log_url": "<string>",
"charge": "<string>"
},
"request_id": "<string>",
"timestamp": 123
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"decline_code": "<string>",
"request_log_url": "<string>",
"charge": "<string>"
},
"request_id": "<string>",
"timestamp": 123
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"decline_code": "<string>",
"request_log_url": "<string>",
"charge": "<string>"
},
"request_id": "<string>",
"timestamp": 123
}支付 API
查询支付会话
根据支付会话 ID 查询支付会话详情。
GET
/
api
/
v1
/
checkout
/
sessions
/
{session_id}
{
"id": "<string>",
"amount_total": 123,
"currency": "<string>",
"payment_status": "pending",
"created": 123,
"expires_at": 123,
"url": "<string>",
"line_items": [
{
"price_data": {
"currency": "<string>",
"unit_amount": 2,
"product_data": {
"name": "<string>",
"description": "<string>"
}
},
"quantity": 2
}
],
"tax_amount": 123,
"shipping_amount": 123,
"exchange_rate": "<string>",
"target_currency": "<string>",
"target_amount_total": 123,
"rate_locked_at": 123,
"subscription_id": "<string>",
"invoice_id": "<string>",
"metadata": {}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"decline_code": "<string>",
"request_log_url": "<string>",
"charge": "<string>"
},
"request_id": "<string>",
"timestamp": 123
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"decline_code": "<string>",
"request_log_url": "<string>",
"charge": "<string>"
},
"request_id": "<string>",
"timestamp": 123
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"decline_code": "<string>",
"request_log_url": "<string>",
"charge": "<string>"
},
"request_id": "<string>",
"timestamp": 123
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"decline_code": "<string>",
"request_log_url": "<string>",
"charge": "<string>"
},
"request_id": "<string>",
"timestamp": 123
}授权
Bearer API Key,例如 Bearer sk_live_xxx。
Unix 时间戳(秒)。必须与服务端时间相差不超过 5 分钟。
防重放随机字符串,长度 16-64 个字符,建议每次请求使用新的 UUID。
使用商户 API Secret 对 {timestamp}.{nonce}.{requestBody} 计算 HMAC-SHA256,结果为小写 hex。GET 请求的 requestBody 为空字符串。
请求头
Unix 时间戳(秒)。必须与服务端时间相差不超过 5 分钟。
防重放随机字符串,长度 16-64 个字符,建议每次请求使用新的 UUID。
Required string length:
16 - 64使用商户 API Secret 对 {timestamp}.{nonce}.{requestBody} 计算 HMAC-SHA256,结果为小写 hex。GET 请求的 requestBody 为空字符串。
路径参数
支付会话 ID。
响应
查询成功。
支付会话 ID。
订单总金额,使用货币最小单位。
商户账本币种,小写返回。
支付状态。confirming 会映射为 processing,completed 会映射为 paid。
可用选项:
pending, processing, paid, failed, expired, canceled 创建时间,Unix 秒。
过期时间,Unix 秒。
收银台 URL。
商品明细。
Show child attributes
Show child attributes
税费金额,使用货币最小单位。
运费金额,使用货币最小单位。
存在币种转换时返回的汇率值。
用户实际链上支付币种,例如 USDT。
目标支付金额,使用目标币种最小单位。
汇率锁定时间,Unix 秒。
关联订阅 ID,仅订阅场景返回。
关联发票 ID,仅发票/订阅场景返回。
商户自定义元数据。
Show child attributes
Show child attributes
最后修改于 2026年8月4日
此页面对您有帮助吗?
