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

# Create Order

> Creates an offramp order to cash out stablecoins to fiat. The order returns on-chain deposit instructions that the payer wallet broadcasts to fund the fiat payout.



## OpenAPI

````yaml api-reference/_open-api/OfframpAPIs.json POST /2022-06-09/orders
openapi: 3.0.1
info:
  description: |
    Offramp APIs for cashing out stablecoins to fiat.
  version: 1.0.0
  title: Offramp
  contact:
    name: Crossmint Offramp APIs
    url: https://www.crossmint.com
    email: support@crossmint.com
servers:
  - url: https://staging.crossmint.com/api
    description: Staging environment (testnets)
  - url: https://www.crossmint.com/api
    description: Production environment (mainnets)
security: []
tags:
  - name: Offramp
    description: APIs to cash out stablecoins to fiat (offramp)
  - name: Payment Methods
    description: Manage bank account payout methods for offramp.
paths:
  /2022-06-09/orders:
    post:
      tags:
        - Offramp
      summary: Create Order
      description: >
        Creates an offramp order to cash out stablecoins to fiat. The order
        returns on-chain deposit instructions under `payment.preparation`: a
        prepared stablecoin transfer (`serializedTransaction`) that already
        carries the order memo, which the payer wallet signs and broadcasts.
        Crossmint matches the deposit to the order by that memo and pays out to
        the recipient payout method.


        **Prerequisites**: the recipient must be a user who is KYC-verified for
        offramp, and the payout method (for example a bank account) must be
        saved beforehand with the Create Payment Method endpoint. The payer
        wallet must belong to the same verified user.


        **API scope required**: `orders.create`
      operationId: create-offramp-order
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - recipient
                - payment
                - lineItems
              properties:
                recipient:
                  $ref: '#/components/schemas/Recipient'
                payment:
                  $ref: '#/components/schemas/Payment'
                lineItems:
                  $ref: '#/components/schemas/LineItems'
      responses:
        '201':
          description: Order successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateOrderResponse'
        '400':
          description: >-
            Invalid arguments. Make sure you are following the API
            specification.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400Response'
        '403':
          description: Forbidden error. Ensure the credentials are correct.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403Response'
        '404':
          description: Not found error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404Response'
        '503':
          description: >-
            Try again in a few minutes. If the issue still persists, contact
            Crossmint support.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/503Response'
        '524':
          description: A timeout occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/524Response'
      security:
        - apiKey: []
components:
  schemas:
    Recipient:
      type: object
      additionalProperties: false
      title: Payout method
      description: >-
        Recipient of the fiat payout. For offramp, this is the saved payout
        method (for example a bank account) that the funds are sent to. Save the
        payout method beforehand with the Create Payment Method endpoint and
        pass its identifier here.
      properties:
        paymentMethodId:
          type: string
          description: >-
            The identifier of the saved payout method that will receive the fiat
            payout, returned by the Create Payment Method endpoint.
          example: d5e5c48a-7dec-44b1-8cf4-4615bf00c8fc
      required:
        - paymentMethodId
    Payment:
      type: object
      additionalProperties: false
      title: Crypto deposit
      description: >-
        Configuration for the on-chain stablecoin deposit that funds the
        offramp. The buyer sends the stablecoin from `payerAddress` on the chain
        given by `method`, and Crossmint pays out the equivalent fiat to the
        recipient payout method.
      properties:
        method:
          type: string
          description: >-
            The chain the stablecoin is deposited from, as a chain identifier.
            Staging identifiers only work against
            `https://staging.crossmint.com`; production identifiers only work
            against `https://www.crossmint.com`.


            | Chain | Staging identifier | Production identifier |

            | --- | --- | --- |

            | Solana | `solana` | `solana` |

            | Base | `base-sepolia` | `base` |

            | Polygon | `polygon-amoy` | `polygon` |


            Additional chains are available on request. Contact Crossmint
            support to enable them.
          example: base-sepolia
        currency:
          type: string
          description: The stablecoin deposited to fund the payout.
          example: usdc
        payerAddress:
          type: string
          description: >-
            The wallet address the stablecoin deposit is sent from. It must
            belong to the same user who is KYC-verified for offramp and owns the
            payout method.
          example: '0xAa266270cf90FEEA9760617d9c7B5083e9f08984'
        receiptEmail:
          type: string
          format: email
          description: Optional email that the receipt is sent to.
      required:
        - method
        - currency
        - payerAddress
    LineItems:
      type: object
      additionalProperties: false
      description: The fiat to receive, identifying the fiat currency and the amount.
      properties:
        currencyLocator:
          type: string
          description: >-
            The fiat currency to receive, as a `fiat:<currency>` locator. The
            currency must be supported by the payout method and its geography.


            | Fiat currency | Locator |

            | --- | --- |

            | US Dollar | `fiat:usd` |

            | Euro | `fiat:eur` |

            | British Pound | `fiat:gbp` |

            | Mexican Peso | `fiat:mxn` |

            | Colombian Peso | `fiat:cop` |


            Additional currencies (`aud`, `sgd`, `hkd`, `krw`, `inr`, `vnd`,
            `jpy`) are supported subject to availability. See Payment Schemes
            for the currencies available by payout rail.
          example: fiat:usd
        executionParameters:
          type: object
          additionalProperties: false
          description: Parameters controlling how the offramp is executed.
          properties:
            mode:
              type: string
              enum:
                - exact-in
                - exact-out
              description: >-
                Execution mode. Use `exact-in` to deposit an exact stablecoin
                amount and receive the resulting fiat, or `exact-out` to receive
                an exact fiat amount and deposit the resulting stablecoin cost.
              example: exact-in
            amount:
              type: string
              description: >-
                The amount as a decimal string. For `exact-in` this is the
                stablecoin amount to deposit; for `exact-out` this is the fiat
                amount to receive.
              example: '1'
          required:
            - mode
            - amount
      required:
        - currencyLocator
        - executionParameters
    CreateOrderResponse:
      type: object
      properties:
        clientSecret:
          type: string
          description: >-
            A token exclusively scoped to a particular order, allowing for the
            reading or updating of that order.
          example: _removed_
        order:
          $ref: '#/components/schemas/OrderObject'
    400Response:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          description: Human-readable error message describing what went wrong
        code:
          type: string
          description: Machine-readable error code for programmatic handling
    403Response:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: Malformed API key. / API key provided doesn't have required scopes.
    404Response:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: Not found
    503Response:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: >-
            Service temporarily unavailable. Try again in a few minutes. If the
            issue still persists, contact Crossmint support.
    524Response:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: A timeout occurred.
    OrderObject:
      type: object
      properties:
        orderId:
          type: string
          example: 40f49812-123b-4d10-bdae-561e4ed2b990
        phase:
          type: string
          enum:
            - quote
            - payment
            - delivery
            - completed
          description: >-
            The current phase of the order lifecycle. For offramp the order
            starts in `payment` (awaiting the on-chain deposit) and moves to
            `completed` once the fiat payout is done.
          example: payment
        lineItems:
          type: array
          items:
            type: object
            properties:
              metadata:
                type: object
                properties:
                  name:
                    type: string
                    example: USD
                  description:
                    type: string
                    example: United States Dollar
                  imageUrl:
                    type: string
                    example: https://www.crossmint.com/assets/ui/flags/us.svg
              quote:
                type: object
                properties:
                  status:
                    type: string
                    example: valid
                  charges:
                    type: object
                    properties:
                      unit:
                        type: object
                        properties:
                          amount:
                            type: string
                            example: '1'
                          currency:
                            type: string
                            example: usdc
                      fees:
                        type: object
                        properties:
                          type:
                            type: string
                            example: exact
                          amount:
                            type: string
                            example: '0.002'
                          currency:
                            type: string
                            example: usdc
                  totalPrice:
                    type: object
                    properties:
                      amount:
                        type: string
                        example: '1'
                      currency:
                        type: string
                        example: usdc
              delivery:
                type: object
                description: The payout leg of the order.
                properties:
                  status:
                    type: string
                    enum:
                      - awaiting-payment
                      - in-progress
                      - completed
                      - failed
                    description: >-
                      Status of the fiat payout. `awaiting-payment` until the
                      on-chain deposit is received, then `in-progress`, then
                      `completed`. `failed` indicates the payout could not be
                      completed; contact Crossmint support if the order reaches
                      this state.
                    example: awaiting-payment
                  recipient:
                    type: object
                    properties:
                      locator:
                        type: string
                        example: paymentMethodId:d5e5c48a-7dec-44b1-8cf4-4615bf00c8fc
                      paymentMethodId:
                        type: string
                        example: d5e5c48a-7dec-44b1-8cf4-4615bf00c8fc
              executionMode:
                type: string
                example: exact-in
        quote:
          type: object
          properties:
            status:
              type: string
              enum:
                - valid
                - expired
                - requires-recipient
                - all-line-items-unavailable
              example: valid
            quotedAt:
              type: string
              example: '2026-06-17T21:48:49.059Z'
            expiresAt:
              type: string
              example: '2026-06-17T21:58:49.059Z'
            totalPrice:
              type: object
              properties:
                amount:
                  type: string
                  example: '1'
                currency:
                  type: string
                  example: usdc
        payment:
          type: object
          properties:
            status:
              type: string
              enum:
                - requires-quote
                - requires-crypto-payer-address
                - requires-recipient-verification
                - requires-kyc
                - manual-kyc
                - failed-kyc
                - pending-kyc-review
                - crypto-payer-insufficient-funds
                - crypto-payer-insufficient-funds-for-gas
                - awaiting-payment
                - in-progress
                - completed
              description: >-
                Status of the payment, used to determine the next action in the
                offramp flow. `requires-kyc`, `manual-kyc`, `failed-kyc`, and
                `pending-kyc-review` cover the identity verification step.
                `requires-crypto-payer-address` means a payer wallet is still
                needed. `awaiting-payment` means the deposit instructions are
                ready and the buyer can broadcast the deposit. `in-progress` and
                `completed` track the fiat payout.
              example: awaiting-payment
            method:
              type: string
              description: The chain the stablecoin deposit was made from.
              example: base-sepolia
            currency:
              type: string
              example: usdc
            preparation:
              type: object
              description: >-
                On-chain deposit instructions. Sign and broadcast
                `serializedTransaction` from the payer wallet; it already
                carries the order memo, so Crossmint matches the deposit
                automatically.
              properties:
                chain:
                  type: string
                  example: base-sepolia
                payerAddress:
                  type: string
                  example: '0xAa266270cf90FEEA9760617d9c7B5083e9f08984'
                serializedTransaction:
                  type: string
                  description: >-
                    The serialized stablecoin transfer to broadcast. Deserialize
                    it, then sign and send it from the payer wallet.
                  example: 0x02f9018e83014a34...
                transactionParameters:
                  type: object
                  properties:
                    amount:
                      type: string
                      example: '1000000'
                    memo:
                      type: string
                      example: '------BEGIN MEMO------...------END MEMO------'
            received:
              type: object
              description: >-
                The matched on-chain deposit. Populated once the payment is
                received.
              properties:
                chain:
                  type: string
                  example: base-sepolia
                txId:
                  type: string
                  example: >-
                    0xc9537a0e4ee4794101514d30418bd20f09cf66c3ce86b82b0be916489a338e85
                amount:
                  type: string
                  example: '1'
                currency:
                  type: string
                  example: usdc
            receiptEmail:
              type: string
              example: alice@example.com
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-API-KEY
      in: header

````