---
title: "Create Order"
method: POST
path: "/2022-06-09/orders"
tags: ["Headless"]
---

# Create Order

`POST /2022-06-09/orders`

Creates a new order that can be used to complete a headless checkout.

**API scope required**: `orders.create`

## Request body

- object
  - `recipient` string — Allowed formats: `<chain>:<address>` or `email:<email_address>:<chain>` or `userId:<userId>:<chain>` or `twitter:<twitter_handle>:<chain>` [see here for more info](/minting/nfts/integrate/manage-delivery)
  - `locale` string — Specify the locale for the email content [Default: en-US]
  - `payment` union, required
    - object
      - `receiptEmail` string, email — Email that the receipt will be sent to.
      - `method` 'arbitrum-sepolia' | 'base-sepolia' | 'ethereum-sepolia' | 'optimism-sepolia' | 'arbitrum' | 'bsc' | 'ethereum' | 'optimism', required
      - `currency` 'eth' | 'usdc' | 'degen' | 'brett' | 'toshi' | 'usdxm' | 'credit', required
      - `payerAddress` string — An EVM wallet address.
    - object
      - `receiptEmail` string, email — Email that the receipt will be sent to.
      - `method` 'solana', required
      - `currency` 'sol' | 'usdc' | 'bonk', required
      - `payerAddress` string — A Solana public key.
    - object
      - `receiptEmail` string, email — Email that the receipt will be sent to.
      - `method` 'card', required
      - `currency` 'usd' | 'eur' | 'aud' | 'gbp' | 'jpy' | 'sgd' | 'hkd' | 'krw' | 'inr' | 'vnd'
  - `lineItems` union, required
    - object
      - `collectionLocator` string, required — The collection locator of the line item. For example: `crossmint:<collectionId>`. These fields can be retrieved from the Crossmint console.
      - `callData` object — Information that you pass to your contract mint function.
        - `totalPrice` string — The total price of the line item. It must be the same as the contract expects to receive. Read /docs.crossmint.com/payments/advanced/component-properties#mintconfig
    - object
      - `currencyLocator` string, required — Locator for an offramp (fiat payout) order. Format: `fiat:<currency>` (e.g. `fiat:usd`).
      - `executionParameters` object, required — Parameters controlling how the offramp payout is executed.
        - `mode` 'exact-in', required — Execution mode. Offramp supports `exact-in` (spend an exact USDC amount).
        - `amount` string, required — The USDC amount to convert and pay out, as a decimal string.
    - object
      - `productLocator` string, required — The product locator for physical products. For Amazon products, use format `amazon:<ASIN>` (e.g. `amazon:B01DFKC2SO`) or `amazon:<URL>` (e.g. `amazon:https://www.amazon.com/dp/B01DFKC2SO`).
    - object
      - `tokenLocator` string, required — The token locator of the line item. For EVM chains use format `<blockchain>:<contractAddress>:<tokenId>` (e.g. `ethereum:0x71c7656ec7ab88b098defb751b7401b5f6d897:1234`). For Solana use format `solana:<mintHash>` (e.g. `solana:7nE9XwXs3XgpH8rnXMFvQYWZTXUFJyZC4rZ5CPX4X4p5`).
      - `callData` object — Information that you pass to your contract mint function.
        - `totalPrice` string — The total price of the line item. It must be the same as the contract expects to receive. Read /docs.crossmint.com/payments/advanced/component-properties#mintconfig
      - `executionParameters` object — Parameters for executing the purchase of fungible tokens like memecoins.
        - `mode` 'exact-in', required — The execution method for the order. 'exact-in' is used for buying fungible tokens like memecoins, specifying the exact amount to spend.
        - `amount` string, required — The amount in USD to spend on the token purchase.
        - `maxSlippageBps` string — Optional slippage tolerance in basis points (e.g., '500' for 5%). If not provided, default slippage will be applied.
    - object[]
      - `collectionLocator` string, required — The collection locator of the line item. For example: `crossmint:<collectionId>`. These fields can be retrieved from the Crossmint console.
      - `callData` object — Information that you pass to your contract mint function.
        - `totalPrice` string — The total price of the line item. It must be the same as the contract expects to receive. Read /docs.crossmint.com/payments/advanced/component-properties#mintconfig
    - object[]
      - `tokenLocator` string, required — The token locator of the line item. For EVM chains use format `<blockchain>:<contractAddress>:<tokenId>` (e.g. `ethereum:0x71c7656ec7ab88b098defb751b7401b5f6d897:1234`). For Solana use format `solana:<mintHash>` (e.g. `solana:7nE9XwXs3XgpH8rnXMFvQYWZTXUFJyZC4rZ5CPX4X4p5`).
      - `callData` object — Information that you pass to your contract mint function.
        - `totalPrice` string — The total price of the line item. It must be the same as the contract expects to receive. Read /docs.crossmint.com/payments/advanced/component-properties#mintconfig
        - `quantityRange` object — The estimated quantity range for memecoin purchases based on market conditions and slippage.
          - `lowerBound` string — The minimum quantity of tokens expected to be received based on current price and slippage.
          - `upperBound` string — The maximum quantity of tokens expected to be received based on current price and slippage.
      - `executionParameters` object — Parameters for executing the purchase of fungible tokens like memecoins.
        - `mode` 'exact-in', required — The execution method for the order. 'exact-in' is used for buying fungible tokens like memecoins, specifying the exact amount to spend.
        - `amount` string, required — The amount in USD to spend on the token purchase.
        - `maxSlippageBps` string — Optional slippage tolerance in basis points (e.g., '500' for 5%). If not provided, default slippage will be applied.
  - `state` 'draft' | 'create' — Determines whether an order is officially created or whether it simply returns what an order would look like. Use `draft` to review results prior to committing. Draft orders are not currently persisted and will not be queryable via APIs. Use `create` (default) to place the order and proceed to payment/fulfillment.

## Response `201`

Order successfully created.

- CreateOrderResponse
  - `clientSecret` string — A token exclusively scoped to a particular order, allowing for the reading or updating of that order.
  - `order` OrderObject
    - `orderId` string
    - `phase` string
    - `locale` string
    - `lineItems` object[]
      - `chain` string
      - `executionMode` 'exact-out' | 'exact-in' — Execution mode for the line item. 'exact-out' is used for NFT purchases. 'exact-in' is used for token or memecoin purchases.
      - `quantity` number
      - `callData` object
        - `quantity` number
        - `ADDITIONAL_PROPERTIES` string
      - `executionParams` object — Raw mint arguments for exact-in token or memecoin purchases. Only present when executionMode is 'exact-in'.
      - `maxSlippageBps` string — Slippage tolerance in basis points. Only present when executionMode is 'exact-in'.
      - `metadata` object
        - `name` string
        - `description` string
        - `imageUrl` string
      - `quote` object
        - `status` string
        - `charges` object
          - `unit` object
            - `amount` string
            - `currency` string
          - `salesTax` object — Sales tax applied to physical product purchases
            - `amount` string
            - `currency` string
          - `shipping` object — Shipping costs for physical product purchases
            - `amount` string
            - `currency` string
        - `totalPrice` object
          - `amount` string
          - `currency` string
      - `delivery` object
        - `status` 'awaiting-payment' | 'in-progress' | 'completed' | 'failed' — Status of the delivery. 'awaiting-payment': Initial state before payment is made. 'in-progress': Payment received, transaction submitted but not yet completed. 'completed': Successfully delivered with transaction ID and tokens. 'failed': Delivery failed, typically for refunded transactions.
        - `rail` 'rtp' | 'fednow' | 'ach-same-day' | 'ach-us' | 'wire' | 'sepa-instant' | 'sepa' | 'spei' | 'ach-co' — Bank rail the payout was routed over. Present on offramp orders once routing has resolved; immutable thereafter.
        - `recipient` object
          - `locator` string
          - `email` string
          - `walletAddress` string
        - `txId` string — The blockchain transaction ID. Only present when status is 'completed'.
        - `tokens` object[] — Array of tokens delivered. Only present when status is 'completed'.
          - `locator` string — Universal token locator in the format chain:address:tokenId
          - `contractAddress` string — The contract address (EVM chains)
          - `tokenId` string — The token ID (EVM chains)
          - `mintHash` string — The mint hash or address (Solana)
          - `quantity` string — The quantity of tokens delivered in smallest units (optional, only for fungible tokens in exact-in mode)
          - `symbol` string — The token symbol (optional, only when quantity is present)
          - `decimals` number — The number of decimals for the token (optional, only when quantity is present)
    - `quote` object
      - `status` 'valid' | 'expired' | 'all-line-items-unavailable' | 'requires-physical-address' — Status of the quote. 'requires-physical-address' indicates that a shipping address is required for physical products.
      - `quotedAt` string
      - `expiresAt` string
      - `totalPrice` object
        - `amount` string
        - `currency` string
    - `payment` object
      - `status` 'requires-kyc' | 'failed-kyc' | 'manual-kyc' | 'awaiting-payment' | 'requires-recipient' | 'requires-crypto-payer-address' | 'failed' | 'in-progress' | 'completed' — Status of the payment. View the status codes for more information.
      - `method` string
      - `currency` string
      - `preparation` object
        - `chain` string
        - `payerAddress` string
        - `serializedTransaction` string
      - `receiptEmail` string — Email address that the receipt will be sent to.
      - `received` object — Payment amount received. Present when payment is completed.
        - `amount` string
        - `currency` string
      - `refunded` object — Refund amount and currency. Present when a refund was issued.
        - `amount` string
        - `currency` string
      - `failureReason` object — Reason for payment failure. Present when payment status is 'failed'.
        - `code` string
        - `message` string

## Other responses

- `400` — Invalid arguments, please make sure you're following the api specification.
- `403` — Forbidden error, please ensure the credentials are correct.
- `404` — Not found error.
- `503` — Please try again in a few minutes. If the issue still persists, contact Crossmint support.
- `524` — A timeout occurred.

---

[API](https://skmtc.net/crossmint/apis/onramp.md) · [All operations](https://skmtc.net/crossmint/apis/onramp/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/crossmint/onramp/revisions/e2143d192130/schema)
