本部署未开启买入。调用返回 40302,不查询支付。
GET/api/v1/orders/{id}
| 认证 | 请求头 Authorization: Bearer <访问令牌>,访问令牌用设备码换取,不要向用户要密码、短信验证码或 API Key |
|---|---|
| 权限 | order:read 在本部署未开启买入时返回 40302,不查询支付。 |
路径参数
path
idstring必填资源 ID
路径示例
/api/v1/orders/id_example响应
200
application/json
成功时 code 为 200,资源在 data
idstring必填订单 ID
statusenum<string>必填只有 paid 表示支付成功
可选值: pendingpaidclosed
amountinteger必填订单金额,整数分
currencystring必填货币代码
updated_atstring必填更新时间,ISO-8601
items[].idstring必填订单行 ID
items[].variant_idstring必填下单时的规格 ID
items[].qtyinteger必填数量
items[].amountinteger必填行金额,整数分
payment.idstring支付记录 ID,没有支付记录时 payment 为 null
payment.providerstring支付实现,由服务端固定
payment.channelenum<string>已保存的收银台
可选值: desktopmobile
payment.statusstring支付记录状态
payment.actionstring | null完整支付 URL,打开它不等于已支付
unapplied_receipt.statusenum<string>未履约收款状态,没有时为 null
可选值: openfulfilled_manuallyrefundedrefund_failed
unapplied_receipt.amountinteger收款金额,整数分
unapplied_receipt.provider_trade_nostring服务商交易号
unapplied_receipt.failure_reasonstring | null失败原因,没有时为 null
响应示例
{
"id": "id_example",
"status": "pending",
"amount": 159900,
"currency": "CNY",
"updated_at": "2026-05-16T00:00:00.000Z",
"items": [
{
"id": "id_example",
"variant_id": "var_example",
"qty": 1,
"amount": 159900
}
],
"payment": {
"id": "pay_example",
"provider": "string",
"channel": "desktop",
"status": "pay_example",
"action": null
},
"unapplied_receipt": {
"status": "open",
"amount": 159900,
"provider_trade_no": "string",
"failure_reason": null
}
}