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

# Process Payment

> Associates the broadcast on-chain stablecoin deposit with an offramp order by its transaction ID.

This call is **optional**: the prepared transaction returned by Create Order already carries the order memo, so Crossmint matches the deposit to the order automatically once it is broadcast. Use this endpoint to explicitly attach the deposit transaction to the order (for example when you broadcast the transfer yourself and want to report the transaction ID immediately rather than waiting for automatic matching).

**Authentication**: Use either a server-side API key with the `orders.update` scope, or the `clientSecret` returned when the order was created, passed as an `Authorization` header.




## OpenAPI

````yaml post /2022-06-09/orders/{orderId}/payment
openapi: 3.0.1
info:
  description: |
    N/A
  version: 1.0.0
  title: Headless Checkout
  contact:
    name: Crossmint Headless Checkout 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: Headless Checkout
    description: APIs to use the headless checkout
paths:
  /2022-06-09/orders/{orderId}/payment:
    post:
      tags:
        - Headless
      summary: Process Payment
      description: >
        Process payment for an order using a crypto transaction ID.


        **Authentication**: Use either a server-side API key with
        `orders.update` scope, the `clientSecret` from order creation as an
        authorization header, or a JWT token with `orders.create` scope.
      operationId: process-payment
      parameters:
        - $ref: '#/components/parameters/orderId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProcessPaymentInput'
      responses:
        '200':
          description: Payment processed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderObject'
        '400':
          description: >-
            Invalid arguments, please make sure you're following the api
            specification.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400Response'
        '403':
          description: Forbidden error, please 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: >-
            Please 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: []
        - orderClientSecret: []
components:
  parameters:
    orderId:
      name: orderId
      in: path
      description: |
        This is the identifier for the order with UUID format.

        **Example:** `9c82ef99-617f-497d-9abb-fd355291681b`
      required: true
      schema:
        type: string
  schemas:
    ProcessPaymentInput:
      type: object
      title: Crypto Payment
      description: >-
        Process payment using a crypto transaction ID. Use this when the user
        has already submitted a crypto transaction.
      properties:
        type:
          type: string
          enum:
            - crypto-tx-id
          description: The type of payment being processed
          example: crypto-tx-id
        txId:
          type: string
          description: The transaction ID of the crypto payment
          example: 5UfgJ7vVFmH8K9YxLmNpQrStWvXyZaBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLm
      required:
        - type
        - txId
      additionalProperties: false
    OrderObject:
      type: object
      properties:
        orderId:
          type: string
          example: b2959ca5-65e4-466a-bd26-1bd05cb4f837
        phase:
          type: string
          example: payment
        locale:
          type: string
          example: en-US
        lineItems:
          type: array
          items:
            type: object
            properties:
              chain:
                type: string
                example: polygon-amoy
              executionMode:
                type: string
                enum:
                  - exact-out
                  - exact-in
                description: >-
                  Execution mode for the line item. 'exact-out' is used for NFT
                  purchases. 'exact-in' is used for token or memecoin purchases.
                example: exact-out
              quantity:
                type: number
                example: 1
              callData:
                type: object
                properties:
                  quantity:
                    type: number
                    example: 1
                  ADDITIONAL_PROPERTIES:
                    type: string
                    example: Your other mint function arguments
              executionParams:
                type: object
                description: >-
                  Raw mint arguments for exact-in token or memecoin purchases.
                  Only present when executionMode is 'exact-in'.
                additionalProperties: true
              maxSlippageBps:
                type: string
                description: >-
                  Slippage tolerance in basis points. Only present when
                  executionMode is 'exact-in'.
                example: '50'
              metadata:
                type: object
                properties:
                  name:
                    type: string
                    example: Headless Checkout Demo
                  description:
                    type: string
                    example: NFT Description
                  imageUrl:
                    type: string
                    example: https://cdn.io/image.png
              quote:
                type: object
                properties:
                  status:
                    type: string
                    example: valid
                  charges:
                    type: object
                    properties:
                      unit:
                        type: object
                        properties:
                          amount:
                            type: string
                            example: '0.0001'
                          currency:
                            type: string
                            example: eth
                      salesTax:
                        type: object
                        description: Sales tax applied to physical product purchases
                        properties:
                          amount:
                            type: string
                            example: '0.34'
                          currency:
                            type: string
                            example: usdc
                      shipping:
                        type: object
                        description: Shipping costs for physical product purchases
                        properties:
                          amount:
                            type: string
                            example: '0'
                          currency:
                            type: string
                            example: usdc
                  totalPrice:
                    type: object
                    properties:
                      amount:
                        type: string
                        example: '0.0001'
                      currency:
                        type: string
                        example: eth
              delivery:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - awaiting-payment
                      - in-progress
                      - completed
                      - failed
                    description: >-
                      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.
                    example: awaiting-payment
                  rail:
                    type: string
                    enum:
                      - rtp
                      - fednow
                      - ach-same-day
                      - ach-us
                      - wire
                      - sepa-instant
                      - sepa
                      - spei
                      - ach-co
                    description: >-
                      Bank rail the payout was routed over. Present on offramp
                      orders once routing has resolved; immutable thereafter.
                  completedAt:
                    type: string
                    format: date-time
                    description: >-
                      ISO 8601 timestamp when the fiat payout reached its
                      terminal success signal at the rail. Offramp orders only;
                      present once the delivery is completed, and preserved if a
                      completed payout is later returned. Approximate on delayed
                      rails (ACH, standard SEPA).
                    example: '2026-07-27T20:35:00.000Z'
                  recipient:
                    type: object
                    properties:
                      locator:
                        type: string
                        example: email:<email_address>:<chain>
                      email:
                        type: string
                        example: testy@crossmint.com
                      walletAddress:
                        type: string
                        example: 0x1234abcd...
                  txId:
                    type: string
                    description: >-
                      The blockchain transaction ID. Only present when status is
                      'completed'.
                    example: >-
                      0x2e69f11dae7869b92e3d5eaf4cadd50c48b5c6803d1232815f979d744521ad4c
                  tokens:
                    type: array
                    description: >-
                      Array of tokens delivered. Only present when status is
                      'completed'.
                    items:
                      type: object
                      properties:
                        locator:
                          type: string
                          description: >-
                            Universal token locator in the format
                            chain:address:tokenId
                          example: polygon:0xE04Cf294985282Ddc088E6433c064cfB85eD9EdA:3
                        contractAddress:
                          type: string
                          description: The contract address (EVM chains)
                          example: '0xE04Cf294985282Ddc088E6433c064cfB85eD9EdA'
                        tokenId:
                          type: string
                          description: The token ID (EVM chains)
                          example: '3'
                        mintHash:
                          type: string
                          description: The mint hash or address (Solana)
                          example: MintHashAbc123
                        quantity:
                          type: string
                          description: >-
                            The quantity of tokens delivered in smallest units
                            (optional, only for fungible tokens in exact-in
                            mode)
                          example: '1500000'
                        symbol:
                          type: string
                          description: >-
                            The token symbol (optional, only when quantity is
                            present)
                          example: USDC
                        decimals:
                          type: number
                          description: >-
                            The number of decimals for the token (optional, only
                            when quantity is present)
                          example: 6
        quote:
          type: object
          properties:
            status:
              type: string
              enum:
                - valid
                - expired
                - all-line-items-unavailable
                - requires-physical-address
              description: >-
                Status of the quote. 'requires-physical-address' indicates that
                a shipping address is required for physical products.
              example: valid
            quotedAt:
              type: string
              example: '2024-06-07T16:55:44.653Z'
            expiresAt:
              type: string
              example: '2024-06-07T17:55:44.653Z'
            totalPrice:
              type: object
              properties:
                amount:
                  type: string
                  example: '0.0001375741'
                currency:
                  type: string
                  example: eth
        payment:
          type: object
          properties:
            status:
              type: string
              enum:
                - requires-kyc
                - failed-kyc
                - manual-kyc
                - awaiting-payment
                - requires-recipient
                - requires-crypto-payer-address
                - failed
                - in-progress
                - completed
              description: >-
                Status of the payment. View the status codes for more
                information.
              example: awaiting-payment
            method:
              type: string
              example: base-sepolia
            currency:
              type: string
              example: eth
            preparation:
              type: object
              properties:
                chain:
                  type: string
                  example: base-sepolia
                payerAddress:
                  type: string
                  example: 0x1234abcd...
                serializedTransaction:
                  type: string
                  example: 0x02f90.....
            receiptEmail:
              type: string
              description: Email address that the receipt will be sent to.
              example: user@example.com
            received:
              type: object
              description: Payment amount received. Present when payment is completed.
              properties:
                amount:
                  type: string
                  example: '0.50'
                currency:
                  type: string
                  example: usd
            refunded:
              type: object
              description: Refund amount and currency. Present when a refund was issued.
              properties:
                amount:
                  type: string
                  example: '0.50'
                currency:
                  type: string
                  example: usd
            failureReason:
              type: object
              description: >-
                Reason for payment failure. Present when payment status is
                'failed'.
              properties:
                code:
                  type: string
                  example: payment-declined
                message:
                  type: string
                  example: The payment was declined by the issuer.
    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
          enum:
            - single_purchase_exceeded
            - daily_transaction_exceeded
            - token_daily_volume_exceeded
        parameters:
          type: object
          description: Additional parameters providing context for the error
          properties:
            amount:
              type: string
              description: Transaction amount that caused the error
            limit:
              type: string
              description: The limit that was exceeded
            hoursUntilReset:
              type: string
              description: Hours until the limit resets
            remainingAmount:
              type: string
              description: Remaining amount available before hitting the limit
    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: >-
            Please 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.
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-API-KEY
      in: header
    orderClientSecret:
      type: apiKey
      name: Authorization
      in: header

````