> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 收银台单详情查询

> 根据预付单Id或商户订单号查询收银台订单详情。

## 概述

本页说明 `GET /payment/open/institution/v2/pay/order/query` 接口。完整的请求参数、响应结构与示例由上方关联的 OpenAPI 定义渲染。

## 说明

* 认证方式使用 GatePay 标准签名请求头。
* 本页展示同一接口的机构路径版本。
* 除创建子账户、查询子账户详情、分页查询子账户外，机构侧请求需携带 `X-GatePay-On-Behalf-Of`。
* `prepayId` 与 `merchantTradeNo` 二选一，至少传一个。
* 本接口返回订单查询结果本体，不使用通知回调中的 `bizType` / `bizStatus` 外层结构。
* 对中心化支付订单，请结合 `orderAmount` 与 `pay_amount` 理解支付金额字段含义。
* 推荐把本接口视为最终确认与对账接口，而不是只在异常时才调用。
* 通用签名规则请参见 [/api-reference/version/100/cn/common/securityAndSignature](/api-reference/version/100/cn/common/securityAndSignature)。


## OpenAPI

````yaml api-reference/version/100/cn/openapi/institution/checkout-payment-openapi.json GET /payment/open/institution/v2/pay/order/query
openapi: 3.1.0
info:
  title: GatePay 机构收银台支付 API
  description: Gate Pay 收银台支付 API，用于收银台下单、退款及订单查询。
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths:
  /payment/open/institution/v2/pay/order/query:
    get:
      summary: 收银台单详情查询
      description: 根据预付单Id或商户订单号查询收银台订单详情。
      parameters:
        - $ref: '#/components/parameters/X-GatePay-Certificate-ClientId'
        - $ref: '#/components/parameters/X-GatePay-Signature'
        - $ref: '#/components/parameters/X-GatePay-Timestamp'
        - $ref: '#/components/parameters/X-GatePay-Nonce'
        - name: prepayId
          in: query
          required: false
          description: 预付单Id
          schema:
            type: string
        - name: merchantTradeNo
          in: query
          required: false
          description: 商户订单id
          schema:
            type: string
      responses:
        '200':
          description: 查询成功
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/OrderQueryBizData'
                        description: 收银台订单详情
              examples:
                successResponse:
                  summary: 成功响应
                  value:
                    status: SUCCESS
                    code: '000000'
                    errorMessage: ''
                    data:
                      prepayId: '65466648727916544'
                      merchantId: '10002'
                      merchantTradeNo: '163'
                      transactionId: '65466648727916545'
                      goodsName: charge
                      currency: USDT
                      orderAmount: '118.75'
                      surchargeAmount: '0'
                      toleranceAmount: '0'
                      underpaidAmount: '0'
                      fiatCurrency: USD
                      fiatAmount: '100'
                      fiatRate: '1.1875'
                      status: PAID
                      createTime: 1677573665000
                      expireTime: 1677577265000
                      transactTime: 1677573665219
                      order_name: charge
                      pay_currency: USDT
                      pay_amount: '118.75'
                      expectCurrency: USDT
                      actualCurrency: USDT
                      actualAmount: '118.75'
                      rate: '1'
                      channelId: '123456'
                      address: '0x86608d3C9f979b98a3b2417216eD859d313E339D'
                      chain: MATIC
                      fullCurrType: USDT_MATIC
                      inUsdt: '118.75'
                      location: https://www.gate.com/cashier?prepayid=65466648727916544
                      merchantName: test merchant
                      returnUrl: https://lotkeys.com/tr/gate-payment-response
                      transaction_info:
                        done_amount: '118.75'
                        confirming_list:
                          - amount: '50'
                            confirm: 2
                            txId: '0xabc123'
                            confirmingTime: 1677573666000
                            complianceStatus: ACCEPTED
                        done_list:
                          - txId: '0xdef456'
                            amount: '68.75'
                            doneTime: 1677573667000
                      whiteBrandInfo:
                        logoUrl: https://example.com/logo.png
                        brand: GatePay
                        payWays: []
                      totalFeeAmount: '0'
                      totalSettleAmount: ''
                      payDetails: []
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      description: 商户客户端ID
      schema:
        type: string
        example: mZ96D37oKk-HrWJc
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: 签名
      schema:
        type: string
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      description: 时间戳（毫秒）
      schema:
        type: string
        example: '1695611256106'
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: 随机数
      schema:
        type: string
        example: '1260554069'
  schemas:
    ApiResponse:
      type: object
      properties:
        status:
          type: string
          description: 请求状态
        code:
          type: string
          description: 响应码
        errorMessage:
          type: string
          description: 错误信息
    OrderQueryBizData:
      type: object
      properties:
        prepayId:
          type: string
          description: 预付单Id
        merchantId:
          type: string
          description: 商户Id
        merchantTradeNo:
          type: string
          description: 商户订单号
        transactionId:
          type: string
          description: 交易ID
        goodsName:
          type: string
          description: 商品名称
        currency:
          type: string
          description: 订单币种
        orderAmount:
          type: string
          description: 订单金额
        surchargeAmount:
          type: string
          description: 附加费
        toleranceAmount:
          type: string
          description: 容差金额
        underpaidAmount:
          type: string
          description: 少付金额
        fiatCurrency:
          type: string
          description: 法币币种
        fiatAmount:
          type: string
          description: 法币金额
        fiatRate:
          type: string
          description: 法币汇率
        status:
          type: string
          description: 订单状态
          enum:
            - PENDING
            - PROCESS
            - PAID
            - EXPIRED
            - CANCELLED
            - ERROR
            - BLOCK
            - AUDITING
            - REJECTED
            - AUDIT_ERROR
        createTime:
          type: integer
          format: int64
          description: 创建时间
        expireTime:
          type: integer
          format: int64
          description: 过期时间
        transactTime:
          type: integer
          format: int64
          description: 交易时间
        order_name:
          type: string
          description: 订单名称
        pay_currency:
          type: string
          description: 支付币种
        pay_amount:
          type: string
          description: 支付金额；对中心化支付订单，该字段表示应支付金额，请结合 orderAmount 理解
        expectCurrency:
          type: string
          description: 期望币种
        actualCurrency:
          type: string
          description: 实际币种
        actualAmount:
          type: string
          description: 实际金额
        rate:
          type: string
          description: 汇率
        channelId:
          type: string
          description: 客户名称
        address:
          type: string
          description: 收款地址
        appLogo:
          type: string
          description: 应用Logo
        appName:
          type: string
          description: 应用名称
        chain:
          type: string
          description: 链
        channel_type:
          type: string
          description: 渠道类型
        fromAddress:
          type: string
          description: 来源地址
        fullCurrType:
          type: string
          description: 完整币种类型
        inUsdt:
          type: string
          description: USDT等值金额
        location:
          type: string
          description: 收银台地址
        merchantName:
          type: string
          description: 商户名称
        pay_account:
          type: string
          description: 支付账号
        qrcode:
          type: string
          description: 二维码
        returnUrl:
          type: string
          description: 支付成功返回地址
        scheme:
          type: string
          description: 链接scheme
        showChainNameEn:
          type: string
          description: 链英文展示名
        totalFee:
          type: string
          description: 总手续费
        txHash:
          type: string
          description: 交易哈希
        transaction_info:
          type: object
          properties:
            done_amount:
              type: string
              description: 已完成金额
            confirming_list:
              type: array
              description: 确认中链上交易列表
              items:
                type: object
                properties:
                  amount:
                    type: string
                    description: 金额
                  confirm:
                    type: integer
                    description: 确认数
                  txId:
                    type: string
                    description: 链上交易 Hash
                  confirmingTime:
                    type: integer
                    format: int64
                    description: 链上交易开始同步时间（毫秒）
                  complianceStatus:
                    type: string
                    description: 合规验证状态：`ACCEPTED` 通过、`PEND` 待处理、`REJECTED` 拒绝
            done_list:
              type: array
              description: 已确认链上交易列表
              items:
                type: object
                properties:
                  txId:
                    type: string
                    description: 链上交易 Hash
                  amount:
                    type: string
                    description: 金额
                  doneTime:
                    type: integer
                    format: int64
                    description: 链上交易确认时间（毫秒）
        whiteBrandInfo:
          type: object
          properties:
            logoUrl:
              type: string
              description: Logo地址
            brand:
              type: string
              description: 品牌
            payWays:
              type: array
              description: 支付方式
              items:
                type: object
        totalFeeAmount:
          type: string
          description: 累计已收取的手续费。若支付流水未结算、未支付或仅为中心化支付等场景，可能为空或为 0
        totalSettleAmount:
          type: string
          description: 累计已结算金额。若支付流水未结算等场景，可能为空
        payDetails:
          type: array
          description: 支付信息
          items:
            $ref: '#/components/schemas/OrderQueryPayDetail'
    OrderQueryPayDetail:
      type: object
      description: 支付流水中单笔支付的手续费与结算信息（payDetail）。
      properties:
        transactionId:
          type: string
          description: 支付流水号
        payType:
          type: string
          description: 支付类型：`GatePay` Gate 支付，`Web3Pay` Web3 支付
        payTime:
          type: string
          description: 支付时间
        payAmount:
          type: string
          description: 支付金额
        payCurrency:
          type: string
          description: 支付币种
        feeAmount:
          type: string
          description: 手续费
        settleAmount:
          type: string
          description: 结算金额
        settlementStatus:
          type: string
          description: 结算状态：`pending` 未结算，`done` 已结算

````