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

# Prepare Order for Funding

> Prepare an order for funding. This updates the order with the cryptoAddress 

 The order is ready to be paid, and once funds are received, the order will automatically complete.



## OpenAPI

````yaml POST /v1/orders/funding
openapi: 3.0.3
info:
  title: Chessa Accounts API
  description: API collection for Chessa Accounts services
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.chessa.ai
security: []
tags:
  - name: User Endpoints
    description: Endpoints related to user management
  - name: Configuration Endpoints
    description: Endpoints for fetching application configurations
  - name: Recipient Endpoints
    description: Endpoints for managing recipients
  - name: Order Endpoints
    description: Endpoints for managing orders
  - name: Rate Endpoints
    description: Endpoints for exchange rates and fees
  - name: Referral Endpoints
    description: Endpoints for managing referrals
paths:
  /v1/orders/funding:
    post:
      tags:
        - Order Endpoints
      summary: Prepare Order for Funding
      description: >-
        Prepare an order for funding. This updates the order with the
        cryptoAddress (and cryptoTage depending on the chain)


        The order is ready to be paid, and once funds are received, the order
        will automatically complete.
      operationId: prepareOrderForFunding
      parameters:
        - name: x-client-id
          in: header
          schema:
            type: string
            example: ''
        - name: x-client-secret
          in: header
          schema:
            type: string
            example: ''
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                chain:
                  type: string
                  example: Solana
                notes:
                  type: string
                  example: Additional comments for the payment
                orderId:
                  type: string
                  example: 9b9d0383-20e1-48ef-bf08-57a26c63807e
            example:
              chain: Solana
              notes: Additional comments for the payment
              orderId: 9b9d0383-20e1-48ef-bf08-57a26c63807e
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    type: object
                    properties:
                      createdAt:
                        type: string
                        example: '2025-03-18T06:05:27.754Z'
                      cryptoAddress:
                        type: string
                        example: 5u1gLZrAiyw6yAyYx3N6D916CUqEcoTkwvF54QwDGzRn
                      cryptoAddressChain:
                        type: string
                        example: Solana
                      cryptoAddressId:
                        type: string
                        example: 74b62929-47f4-43f9-a4dc-a987deaff799
                      cryptoAddressTag:
                        type: string
                        example: ''
                      cryptoDepositId:
                        nullable: true
                        example: null
                      destinationAmount:
                        type: string
                        example: '1500.00000000'
                      destinationAsset:
                        type: string
                        example: NGN
                      destinationCountry:
                        type: string
                        example: NG
                      expiresAt:
                        type: string
                        example: '2025-03-18T08:05:27.751Z'
                      feeAmount:
                        type: string
                        example: '0.00000000'
                      feeCurrency:
                        type: string
                        example: USDC
                      feeUsd:
                        type: string
                        example: '0.00000000'
                      id:
                        type: string
                        example: b647214f-3c33-4027-986b-3a46f041e800
                      note:
                        nullable: true
                        example: null
                      originAmount:
                        type: string
                        example: '0.95000000'
                      originAsset:
                        type: string
                        example: USDC
                      partnerId:
                        type: string
                        example: 4646e61e-33cf-452b-8bba-c138b78a57f0
                      recipientId:
                        type: string
                        example: f12b990c-d4dc-4dc7-8b42-cbaa90308820
                      refundAddress:
                        nullable: true
                        example: null
                      senderConfirmedAt:
                        nullable: true
                        example: null
                      shortId:
                        type: string
                        example: N3LBXEUI
                      status:
                        type: string
                        example: waiting_for_funding
                      updatedAt:
                        type: string
                        example: '2025-03-18T06:06:46.500Z'
                      userId:
                        type: string
                        example: 02e31a45-9474-4858-a833-06e89e494003
              examples:
                Success Response:
                  value:
                    order:
                      createdAt: '2025-03-18T06:05:27.754Z'
                      cryptoAddress: 5u1gLZrAiyw6yAyYx3N6D916CUqEcoTkwvF54QwDGzRn
                      cryptoAddressChain: Solana
                      cryptoAddressId: 74b62929-47f4-43f9-a4dc-a987deaff799
                      cryptoAddressTag: ''
                      cryptoDepositId: null
                      destinationAmount: '1500.00000000'
                      destinationAsset: NGN
                      destinationCountry: NG
                      expiresAt: '2025-03-18T08:05:27.751Z'
                      feeAmount: '0.00000000'
                      feeCurrency: USDC
                      feeUsd: '0.00000000'
                      id: b647214f-3c33-4027-986b-3a46f041e800
                      note: null
                      originAmount: '0.95000000'
                      originAsset: USDC
                      partnerId: 4646e61e-33cf-452b-8bba-c138b78a57f0
                      recipientId: f12b990c-d4dc-4dc7-8b42-cbaa90308820
                      refundAddress: null
                      senderConfirmedAt: null
                      shortId: N3LBXEUI
                      status: waiting_for_funding
                      updatedAt: '2025-03-18T06:06:46.500Z'
                      userId: 02e31a45-9474-4858-a833-06e89e494003
        '400':
          description: Error Response - Invalid Chain
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: validation_error
                  message:
                    type: string
                    example: Invalid chain specified
                  statusCode:
                    type: number
                    example: 400
              examples:
                Error Response - Invalid Chain:
                  value:
                    error: validation_error
                    message: Invalid chain specified
                    statusCode: 400
        '404':
          description: Error Response - Order Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: not_found
                  message:
                    type: string
                    example: Order not found
                  statusCode:
                    type: number
                    example: 404
              examples:
                Error Response - Order Not Found:
                  value:
                    error: not_found
                    message: Order not found
                    statusCode: 404

````