本部署未开启买入。调用返回 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
  }
}