> ## 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.

# 收银台下单

> 创建收银台预订单，指定订单金额、币种、商品信息等。

## 概述

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

## 说明

* 认证方式使用 GatePay 标准签名请求头。
* 本页展示同一接口的机构路径版本。
* 除创建子账户、查询子账户详情、分页查询子账户外，机构侧请求需携带 `X-GatePay-On-Behalf-Of`。
* 这是收银台支付链路的起点接口，通常后续会搭配 `GET /v2/pay/order/query` 与支付回调一起使用。
* 成功响应中请重点保存 `prepayId`，并使用返回的 `location` 跳转用户，不要手动拼接页面地址。
* 通用签名规则请参见 [/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 POST /payment/open/institution/v1/pay/checkout/order
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/v1/pay/checkout/order:
    post:
      summary: 收银台下单
      description: 创建收银台预订单，指定订单金额、币种、商品信息等。
      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'
        - $ref: '#/components/parameters/X-GatePay-On-Behalf-Of'
      requestBody:
        description: 收银台下单请求参数
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckoutOrderRequest'
            examples:
              basicExample:
                summary: 基础示例
                value:
                  merchantTradeNo: '163'
                  env:
                    terminalType: APP
                  currency: USDT
                  orderAmount: '118.75'
                  merchantUserId: 123
                  goods:
                    goodsName: Sipariş Ödemesi - 177
                    goodsDetail: 'Sipariş No : 160'
                  returnUrl: https://lotkeys.com/tr/gate-payment-response
                  cancelUrl: https://lotkeys.com/tr/gate-payment-response
                  chain: MATIC
                  fullCurrType: USDT_MATIC
                  channelId: '123456'
        required: true
      responses:
        '200':
          description: 下单成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutOrderResponse'
              examples:
                successResponse:
                  summary: 成功响应
                  value:
                    status: SUCCESS
                    code: '000000'
                    errorMessage: ''
                    data:
                      prepayId: '65466648727916544'
                      orderAmount: '1'
                      surchargeAmount: '0'
                      currency: USDT
                      fiatCurrency: ''
                      fiatAmount: ''
                      terminalType: APP
                      expireTime: 1677573665219
                      qrContent: >-
                        http://openplatform.gate.io/qr/GA0cskPehKxQpshvm3Goeve8dHpwCl6yCHLSWUYrLqo=
                      location: https://www.gate.com/cashier?prepayid=65466648727916544
                      payCurrency: USDT
                      payAmount: '1'
                      chain:
                        chain_type: BSC
                        address: '0x86608d3C9f979b98a3b2417216eD859d313E339D'
                        fullCurrType: USDT_EOS
                      channelId: '123456'
                      goodsName: charge
                      inUsdt: '93.99'
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'
    X-GatePay-On-Behalf-Of:
      name: X-GatePay-On-Behalf-Of
      in: header
      required: true
      schema:
        type: string
      description: >-
        必填代理归属请求头。请填写本次请求的发起方账户 ID；在机构代理商户 API 中通常填写目标子账户 ID，在机构代扣与划转接口中可填写机构账户
        ID 或子账户 ID。
  schemas:
    CheckoutOrderRequest:
      type: object
      required:
        - merchantTradeNo
        - env
        - goods
        - merchantUserId
        - chain
        - fullCurrType
      properties:
        merchantTradeNo:
          type: string
          description: 商户订单号
          example: '163'
        currency:
          type: string
          description: 加密货币币种
          example: USDT
        orderAmount:
          type: string
          description: 加密货币订单金额，最小值0.000001，最高精度为6位
          example: '118.75'
        surchargeAmount:
          type: string
          description: 附加费，指由消费者承担的费用
        toleranceAmount:
          type: string
          description: 容差金额
        fiatCurrency:
          type: string
          description: 法币币种
        fiatAmount:
          type: string
          description: 法币订单金额，最小值0.01，最高精度为2位
        payCurrency:
          type: string
          description: 地址支付的付款币种
        env:
          $ref: '#/components/schemas/Env'
        goods:
          $ref: '#/components/schemas/Goods'
        orderExpireTime:
          type: integer
          format: int64
          description: 订单过期绝对时间单位毫秒
        returnUrl:
          type: string
          description: 订单支付成功后返回跳转地址
          format: uri
          example: https://lotkeys.com/tr/gate-payment-response
        cancelUrl:
          type: string
          description: 订单支付失败后返回跳转地址
          format: uri
          example: https://lotkeys.com/tr/gate-payment-response
        merchantUserId:
          type: integer
          format: int64
          description: 支付者在商户平台注册时的唯一ID
          example: 123
        chain:
          type: string
          description: 所选链名字
          example: MATIC
        fullCurrType:
          type: string
          description: 包含链名字的币种字段
          example: USDT_MATIC
        channelId:
          type: string
          description: 客户名称
          example: '123456'
        actualCurrency:
          type: string
          description: Actual settlement currency
        payAmount:
          type: string
          description: Payment amount
        address:
          type: string
          description: Blockchain address
    CheckoutOrderResponse:
      type: object
      properties:
        status:
          type: string
          description: 响应状态
          example: SUCCESS
        code:
          type: string
          description: 响应码，000000表示成功
          example: '000000'
        errorMessage:
          type: string
          description: 错误信息，成功时为空
          example: ''
        data:
          $ref: '#/components/schemas/CheckoutOrderData'
    Env:
      type: object
      required:
        - terminalType
      properties:
        terminalType:
          type: string
          description: 交易来源
          enum:
            - APP
            - WEB
            - WAP
            - MINIAPP
            - OTHERS
          example: APP
        scene:
          type: string
          description: Payment scene
    Goods:
      type: object
      required:
        - goodsName
      properties:
        goodsName:
          type: string
          description: 商品名称
          example: Sipariş Ödemesi - 177
        goodsDetail:
          type: string
          description: 商品详情
          example: 'Sipariş No : 160'
    CheckoutOrderData:
      type: object
      properties:
        prepayId:
          type: string
          description: 创建成功的预订单id
          example: '65466648727916544'
        orderAmount:
          type: string
          description: 订单金额
          example: '1'
        currency:
          type: string
          description: 订单加密货币币种
          example: USDT
        surchargeAmount:
          type: string
          description: 附加费
          example: '0'
        toleranceAmount:
          type: string
          description: 容差金额
        fiatCurrency:
          type: string
          description: 法币币种
          example: ''
        fiatAmount:
          type: string
          description: 法币订单金额
          example: ''
        terminalType:
          type: string
          description: 交易来源
          example: APP
        expireTime:
          type: integer
          format: int64
          description: 订单过期时间
          example: 1677573665219
        qrContent:
          type: string
          description: 订单二维码链接
          example: >-
            http://openplatform.gate.io/qr/GA0cskPehKxQpshvm3Goeve8dHpwCl6yCHLSWUYrLqo=
        location:
          type: string
          description: 下单成功调起收银台跳转地址
          example: https://www.gate.com/cashier?prepayid=65466648727916544
        payCurrency:
          type: string
          description: 地址支付付款币种
          example: USDT
        payAmount:
          type: string
          description: 地址支付需要支付的金额
          example: '1'
        chain:
          $ref: '#/components/schemas/ChainInfo'
        goodsName:
          type: string
          description: 商品名称
          example: charge
        inUsdt:
          type: string
          description: 对应的USDT的金额
          example: '93.99'
    ChainInfo:
      type: object
      properties:
        chain_type:
          type: string
          description: 链类型
          example: BSC
        address:
          type: string
          description: 收款地址
          example: '0x86608d3C9f979b98a3b2417216eD859d313E339D'
        fullCurrType:
          type: string
          description: 包含链名字的币种字段
          example: USDT_EOS

````