> ## 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 Withdrawal Order

> Create an OTC withdrawal order after obtaining a quote.

## Overview

This page documents the `POST /withdraw/open/institution/otc/api/order/create` 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.
* For shared signing rules, see [/global/api-reference/version/100/en/common/securityAndSignature](/global/api-reference/version/100/en/common/securityAndSignature).

## Usage Guidance

* Create the order with a fresh quote token.
* Make sure the bank account used in the request is already approved and available for settlement.
* Store the expected fiat amount, fee fields (`tradeFee` / `feeCurrency` / `feeDetail`), and final settlement information for reconciliation.
* Use callback plus detail query rather than relying on creation response alone.


## OpenAPI

````yaml global/api-reference/version/100/en/openapi/institution/otc-fiat-openapi.json POST /withdraw/open/institution/otc/api/order/create
openapi: 3.1.0
info:
  title: GatePay OTC Fiat API
  description: Reference for OTC fiat withdrawal and deposit APIs.
  version: 2.1.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths:
  /withdraw/open/institution/otc/api/order/create:
    post:
      summary: Create OTC Withdrawal Order
      description: Create an OTC withdrawal order after obtaining a quote.
      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/WithdrawalCreateRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WithdrawalCreateOrderResponse'
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      schema:
        type: string
      description: Merchant application client ID used to identify the calling app.
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      schema:
        type: string
      description: >-
        HMAC signature generated from the request according to GatePay signing
        rules.
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      schema:
        type: string
      description: >-
        Millisecond timestamp; the difference from server time must not exceed
        30 seconds.
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      schema:
        type: string
      description: Random nonce used together with the timestamp to prevent replay attacks.
    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:
    WithdrawalCreateRequest:
      type: object
      properties:
        quoteToken:
          type: string
          description: Quote token returned by the quote API.
        bankAccountId:
          type: string
          description: Destination bank account ID for fiat settlement.
        cryptoCurrency:
          type: string
          description: 'Cryptocurrency being sold. Currently supported: USDT, USDC.'
        fiatCurrency:
          type: string
          description: 'Fiat currency to be settled out. Currently supported: USD.'
        cryptoAmount:
          type: string
          description: Crypto amount for the withdrawal order.
        fiatAmount:
          type: string
          description: Expected fiat settlement amount.
        type:
          type: string
          description: Order type. Use SELL for off-ramp.
        clientOrderId:
          type: string
          description: Merchant-defined unique order ID.
      required:
        - quoteToken
        - bankAccountId
        - cryptoCurrency
        - fiatCurrency
        - cryptoAmount
        - fiatAmount
        - type
        - clientOrderId
    WithdrawalCreateOrderResponse:
      type: object
      properties:
        code:
          type: string
          description: Business response code.
        status:
          type: string
          description: Top-level request status.
        errorMessage:
          type: string
          description: Error message when the request fails.
        data:
          $ref: '#/components/schemas/WithdrawalCreateOrderData'
          description: Create off-ramp order result.
    WithdrawalCreateOrderData:
      type: object
      description: Create off-ramp order response data.
      properties:
        orderId:
          type: string
          description: Gate OTC order ID.
        clientOrderId:
          type: string
          description: Merchant order ID.
        status:
          type: string
          description: 'Order status. Values: PROCESSING, DISPATCHED, DONE, FAIL.'
        createTime:
          type: integer
          description: Order creation timestamp in milliseconds.
        tradeFee:
          type: string
          description: Total amount of all fee items.
        feeCurrency:
          type: string
          description: Currency in which each fee item is denominated.
        feeDetail:
          type: array
          description: Fee breakdown.
          items:
            $ref: '#/components/schemas/OtcQuoteFeeDetail'
    OtcQuoteFeeDetail:
      type: object
      properties:
        feeType:
          type: string
          description: >-
            Fee type: `BANK` fee charged by the bank channel, `GATE_PAY` Gate
            Pay service fee amount, `SUBSIDY` promotional amount deducted from
            charged fees.
        amount:
          type: string
          description: Amount for this fee item.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.