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

# Create Checkout Order

> Place an order at the cashier. Returns prepay ID, payment URL, QR content, and chain/address information for the consumer to complete payment.

## Overview

This page documents the `POST /v1/pay/checkout/order` endpoint. The full schema, parameters, and examples are rendered from the linked OpenAPI definition above.

## Notes

* Authentication uses the standard GatePay signed headers.
* This page documents the standard merchant endpoint.
* This is the starting endpoint for the hosted checkout flow and is typically used together with `GET /v2/pay/order/query` and payment callbacks.
* Persist `prepayId` from the success response and use the returned `location` value to redirect the user instead of constructing the page URL manually.
* For shared signing rules, see [/api-reference/version/100/en/common/securityAndSignature](/api-reference/version/100/en/common/securityAndSignature).


## OpenAPI

````yaml /api-reference/version/100/en/openapi/checkout-payment-openapi.json POST /v1/pay/checkout/order
openapi: 3.1.0
info:
  title: GatePay API
  description: >-
    GatePay Checkout Payment API - Create orders at the cashier, process
    refunds, and query order/refund details.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths:
  /v1/pay/checkout/order:
    post:
      summary: Place Checkout Order
      description: >-
        Place an order at the cashier. Returns prepay ID, payment URL, QR
        content, and chain/address information for the consumer to complete
        payment.
      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'
      requestBody:
        description: Checkout order creation parameters
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckoutOrderRequest'
            examples:
              basicExample:
                summary: Basic Example
                value:
                  merchantTradeNo: '163'
                  env:
                    terminalType: APP
                  currency: USDT
                  orderAmount: '118.75'
                  merchantUserId: 123
                  goods:
                    goodsType: '02'
                    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: Order created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutOrderResponse'
              examples:
                successResponse:
                  summary: Success Response
                  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: Merchant client ID, obtained from GatePay platform
      schema:
        type: string
        example: 4186d0c6-6a35-55a9-8dc6-5312769dbff8
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: HMAC-SHA256 signature for request validation
      schema:
        type: string
        example: >-
          672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8a2ec24c97fa6fc5d1533dd6e968863747e1d86a45e562cbe899f9ed7e9ca7f77
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      description: >-
        Timestamp in milliseconds, must not differ from server time by more than
        5 minutes
      schema:
        type: string
        example: '1672905655498'
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: Random nonce for replay attack prevention
      schema:
        type: string
        example: '9578'
  schemas:
    CheckoutOrderRequest:
      type: object
      required:
        - merchantTradeNo
        - env
        - goods
        - merchantUserId
        - chain
        - fullCurrType
      properties:
        merchantTradeNo:
          type: string
          description: Merchant order number, must be unique
          minLength: 5
          maxLength: 32
          example: '163'
        currency:
          type: string
          description: Crypto currency in uppercase, e.g. USDT, BTC
          example: USDT
        orderAmount:
          type: string
          description: Crypto order amount, max precision 6 digits
          example: '118.75'
        surchargeAmount:
          type: string
          description: Surcharge, a fee borne by the consumer
          example: '0'
        toleranceAmount:
          type: string
          description: Tolerance amount
        fiatCurrency:
          type: string
          description: Fiat currency in uppercase
          example: USD
        fiatAmount:
          type: string
          description: Fiat order amount, max precision 2 digits
          example: '100'
        payCurrency:
          type: string
          description: Payment currency for address payment
          example: USDT
        env:
          $ref: '#/components/schemas/CheckoutEnv'
        goods:
          $ref: '#/components/schemas/CheckoutGoods'
        orderExpireTime:
          type: integer
          format: int64
          description: Order expiration time in milliseconds
          example: 1677573665219
        returnUrl:
          type: string
          description: Return URL after successful payment
          format: uri
          maxLength: 512
          example: https://lotkeys.com/tr/gate-payment-response
        cancelUrl:
          type: string
          description: Return URL after failed payment
          format: uri
          maxLength: 512
          example: https://lotkeys.com/tr/gate-payment-response
        merchantUserId:
          type: integer
          format: int64
          description: Unique consumer ID from merchant's platform
          example: 123
        chain:
          type: string
          description: Selected chain name
          example: MATIC
        fullCurrType:
          type: string
          description: Currency field containing chain name
          example: USDT_MATIC
        channelId:
          type: string
          description: Client name
          maxLength: 32
          example: '123456'
    CheckoutOrderResponse:
      type: object
      properties:
        status:
          type: string
          description: Response status
          enum:
            - SUCCESS
            - ERROR
          example: SUCCESS
        code:
          type: string
          description: Response code, 000000 indicates success
          example: '000000'
        errorMessage:
          type: string
          description: Error message, empty on success
          example: ''
        data:
          $ref: '#/components/schemas/CheckoutOrderData'
    CheckoutEnv:
      type: object
      required:
        - terminalType
      properties:
        terminalType:
          type: string
          description: Transaction source
          enum:
            - APP
            - WEB
            - WAP
            - MINIAPP
            - OTHERS
          example: APP
    CheckoutGoods:
      type: object
      required:
        - goodsName
      properties:
        goodsName:
          type: string
          description: Goods name
          maxLength: 100
          example: Sipariş Ödemesi - 177
        goodsDetail:
          type: string
          description: Goods detail description
          maxLength: 500
          example: 'Sipariş No : 160'
        goodsType:
          type: string
          description: Goods type code
          maxLength: 32
          example: '02'
    CheckoutOrderData:
      type: object
      properties:
        prepayId:
          type: string
          description: Pre-order ID
          example: '65466648727916544'
        orderAmount:
          type: string
          description: Order amount
          example: '1'
        currency:
          type: string
          description: Crypto order currency
          example: USDT
        surchargeAmount:
          type: string
          description: Surcharge
          example: '0'
        toleranceAmount:
          type: string
          description: Tolerance amount
        fiatCurrency:
          type: string
          description: Fiat currency
        fiatAmount:
          type: string
          description: Fiat order amount
        terminalType:
          type: string
          description: Transaction source
          example: APP
        expireTime:
          type: integer
          format: int64
          description: Order expiration time in milliseconds
          example: 1677573665219
        qrContent:
          type: string
          description: QR code content for payment
          example: >-
            http://openplatform.gate.io/qr/GA0cskPehKxQpshvm3Goeve8dHpwCl6yCHLSWUYrLqo=
        location:
          type: string
          description: Cashier redirect URL
          format: uri
          example: https://www.gate.com/cashier?prepayid=65466648727916544
        payCurrency:
          type: string
          description: Payment currency
          example: USDT
        payAmount:
          type: string
          description: Payment amount
          example: '1'
        chain:
          $ref: '#/components/schemas/CheckoutChainData'
        channelId:
          type: string
          description: Client name
          example: '123456'
        goodsName:
          type: string
          description: Goods name
          example: charge
        inUsdt:
          type: string
          description: Corresponding USDT amount
          example: '93.99'
    CheckoutChainData:
      type: object
      properties:
        chain_type:
          type: string
          description: Chain name
          example: BSC
        address:
          type: string
          description: Deposit address for the order
          example: '0x86608d3C9f979b98a3b2417216eD859d313E339D'
        fullCurrType:
          type: string
          description: Currency field containing chain name
          example: USDT_EOS

````