> ## 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 Address Payment Order

> Create an order. When the order currency and payment currency are consistent, create a direct address payment order; if the order currency and payment currency are inconsistent, create a convert address payment order.

## Overview

This page documents the `POST /payment/open/institution/v1/pay/address/create` endpoint. The full schema, parameters, and examples are rendered from the linked OpenAPI definition above.

Create an order. When the order currency and payment currency are consistent, create a direct address payment order; if the order currency and payment currency are inconsistent, create a convert address payment order.

## Notes

* Authentication uses the standard GatePay signed headers.
* This page documents the institution-path variant of the same API.
* Institution requests must include `X-GatePay-On-Behalf-Of` to specify the target sub-account.
* 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/institution/address-payment-openapi.json POST /payment/open/institution/v1/pay/address/create
openapi: 3.1.0
info:
  title: GatePay Address Payment API
  description: GatePay Address Payment APIs for crypto payment via blockchain address.
  version: 1.0.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths:
  /payment/open/institution/v1/pay/address/create:
    post:
      summary: Place Order
      description: >-
        Create an order. When the order currency and payment currency are
        consistent, create a direct address payment order; if the order currency
        and payment currency are inconsistent, create a convert address payment
        order.
      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:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderRequest'
            example:
              merchantTradeNo: '93840202212210025'
              currency: BTC
              orderAmount: '2.1'
              env:
                terminalType: MINIAPP
              goods:
                goodsName: USDT_PAY_BTC_TEST
                goodsDetail: yc
              orderExpireTime: 1673410179000
              returnUrl: www.test1.com
              cancelUrl: www.test2.com
              merchantUserId: 1336974
              chain: BSC
              fullCurrType: BTC_BSC
              channelId: '123456'
      responses:
        '200':
          description: SUCCESS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateOrderResponse'
              example:
                status: SUCCESS
                code: '000000'
                errorMessage: ''
                data:
                  prepayId: '47656656276819968'
                  terminalType: MINIAPP
                  expireTime: 1673410179000
                  chain:
                    chain_type: BSC
                    fullCurrType: USDT_BSC
                    address: '0x1699dB45Dc502A0395038265fCBC4Fa05d6afFBD'
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
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: HMAC-SHA256 signature for request validation
      schema:
        type: string
    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
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: Random nonce for replay attack prevention
      schema:
        type: string
    X-GatePay-On-Behalf-Of:
      name: X-GatePay-On-Behalf-Of
      in: header
      required: true
      schema:
        type: string
      description: >-
        Required delegated-subject header. Provide the initiating account ID for
        this request. For institution merchant APIs, this is typically the
        target sub-account ID; for institution charge and transfer APIs, it can
        be either an institution account ID or a sub-account ID.
  schemas:
    CreateOrderRequest:
      type: object
      description: Request for creating a payment order.
      required:
        - merchantTradeNo
        - env
        - goods
        - orderExpireTime
        - merchantUserId
        - chain
        - fullCurrType
      properties:
        merchantTradeNo:
          type: string
          description: Merchant transaction ID in the merchant's system.
        currency:
          type: string
          description: Crypto order currency.
        orderAmount:
          type: string
          description: Crypto order amount.
        toleranceAmount:
          type: string
          description: >-
            Tolerance Amount：If the remaining unpaid amount is less than or
            equal to the configured tolerance amount, the order will be
            automatically marked as Paid, with no further payment required.
        fiatCurrency:
          type: string
          description: >-
            Fiat order currency in uppercase form, such as EUR, GBP, USD, CNY,
            JPY, AUD, CAD, CHF.
        fiatAmount:
          type: string
          description: Fiat order amount, with a maximum precision of 2 digits.
        surchargeAmount:
          type: string
          description: Surcharge, a fee borne by the consumer.
        payCurrency:
          type: string
          description: >-
            User-selected payment currency, not required for non-flash payment
            orders.
        env:
          $ref: '#/components/schemas/EnvRequest'
        goods:
          $ref: '#/components/schemas/GoodsRequest'
        orderExpireTime:
          type: integer
          format: int64
          description: Merchant-specified expiration time of the order, in milliseconds.
        returnUrl:
          type: string
          description: Callback URL for payment completion.
        cancelUrl:
          type: string
          description: Callback URL for payment cancellation.
        merchantUserId:
          type: integer
          format: int64
          description: Unique consumer ID from the merchant’s platform.
        chain:
          type: string
          description: Selected chain name.
        fullCurrType:
          type: string
          description: >-
            Currency field that includes the chain name and corresponds to the
            specific currency on the specific chain.
        channelId:
          type: string
          description: Client Name.
    CreateOrderResponse:
      type: object
      description: Response parameters
      properties:
        status:
          type: string
        code:
          type: string
        errorMessage:
          type: string
        data:
          type: object
          properties:
            prepayId:
              type: string
              description: ID of the created payment order
            terminalType:
              type: string
              description: Terminal type of the created order
            expireTime:
              type: string
              description: Expiration time of the payment order in milliseconds
            chain:
              $ref: '#/components/schemas/Chain'
    EnvRequest:
      type: object
      description: 'Transaction source, optional values: APP, WEB, WAP, MINIAPP, OTHERS.'
      required:
        - terminalType
      properties:
        terminalType:
          type: string
          description: The terminal type used to create the order.
    GoodsRequest:
      type: object
      description: Goods.
      properties:
        goodsName:
          type: string
          description: Name of the goods
        goodsDetail:
          type: string
          description: Details of the goods
    Chain:
      type: object
      description: The chain and address bound to the payment order for address payment
      properties:
        chain_type:
          type: string
          description: Name of the chain
        address:
          type: string
          description: Receiving address of the chain binding to the order
        fullCurrType:
          type: string
          description: The name of the chain including network information.

````