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

# Initiate Crypto-to-Fiat order



## OpenAPI

````yaml /openapi.json post /api/v1/offramp/exchange/initiate
openapi: 3.0.0
info:
  title: Mr Monei API Gateway
  description: External API for partners using API Key authentication
  version: '1.0'
  contact: {}
servers:
  - url: https://api.dev.monei.cc
    description: Dev Server
  - url: https://api.monei.cc
    description: Live Server
security: []
tags: []
paths:
  /api/v1/offramp/exchange/initiate:
    post:
      tags:
        - Offramp | Exchange
      summary: Initiate Crypto-to-Fiat order
      operationId: OfframpExchangeController_initiateSwap
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwapCryptoToFiatRequestDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OfframpOrderResponseDto'
      security:
        - bearer: []
        - api-key: []
components:
  schemas:
    SwapCryptoToFiatRequestDto:
      type: object
      properties:
        amount:
          type: number
          example: 100
        token:
          type: string
          enum:
            - USDT
            - USDC
            - CNGN
        network:
          type: string
          enum:
            - base
            - polygon
            - arbitrum-one
            - bnb-smart-chain
            - ethereum
            - starknet
            - optimism
            - lisk
            - scroll
        fiatCurrency:
          type: string
          enum:
            - NGN
            - GHS
            - KES
            - USD
          default: NGN
        bankCode:
          type: string
          description: Bank Code (e.g. 058 for GTB)
        accountNumber:
          type: string
          description: Account Number
        accountName:
          type: string
          description: Account Name
      required:
        - amount
        - token
        - network
        - fiatCurrency
        - bankCode
        - accountNumber
        - accountName
    OfframpOrderResponseDto:
      type: object
      properties:
        statusCode:
          type: number
        message:
          type: string
        data:
          $ref: '#/components/schemas/OfframpOrderResponseDataDto'
        errors:
          type: object
      required:
        - statusCode
        - message
        - data
        - errors
    OfframpOrderResponseDataDto:
      type: object
      properties:
        id:
          type: string
          example: uuid-string
        reference:
          type: string
          example: OFF-ABC123XYZ
        status:
          type: string
          enum:
            - initiated
            - quote_created
            - awaiting_deposit
            - deposit_received
            - pending
            - processing
            - fiat_sent
            - completed
            - failed
            - cancelled
            - refunded
        amounts:
          $ref: '#/components/schemas/AmountsDto'
        beneficiary:
          $ref: '#/components/schemas/BeneficiaryDto'
        onChain:
          $ref: '#/components/schemas/OnChainDto'
        provider:
          type: string
          enum:
            - monirates
            - bitnob
            - paycrest
        providerReference:
          type: string
          example: paycrest-order-id
        meta:
          type: object
          additionalProperties: true
        failureReason:
          type: string
          example: Insufficient Gas
        timestamps:
          $ref: '#/components/schemas/TimestampsDto'
      required:
        - id
        - reference
        - status
        - amounts
        - beneficiary
        - onChain
        - provider
        - providerReference
        - meta
        - timestamps
    AmountsDto:
      type: object
      properties:
        crypto:
          $ref: '#/components/schemas/CryptoAmountDto'
        fiat:
          $ref: '#/components/schemas/FiatAmountDto'
        exchangeRate:
          type: number
          example: 1550.25
        totalFee:
          type: number
          example: 0.5
      required:
        - crypto
        - fiat
        - exchangeRate
        - totalFee
    BeneficiaryDto:
      type: object
      properties:
        bankCode:
          type: string
          example: '058'
        accountNumber:
          type: string
          example: '0123456789'
        accountName:
          type: string
          example: JOHN DOE
      required:
        - bankCode
        - accountNumber
        - accountName
    OnChainDto:
      type: object
      properties:
        depositAddress:
          type: string
          example: 0xDepositAddress...
        txHash:
          type: string
          example: 0xTransactionHash...
      required:
        - depositAddress
    TimestampsDto:
      type: object
      properties:
        created:
          format: date-time
          type: string
        updated:
          format: date-time
          type: string
        completed:
          format: date-time
          type: string
        failed:
          format: date-time
          type: string
      required:
        - created
        - updated
    CryptoAmountDto:
      type: object
      properties:
        value:
          type: number
          example: 100.5
        asset:
          type: string
          enum:
            - USDT
            - USDC
            - CNGN
        network:
          type: string
          enum:
            - base
            - polygon
            - arbitrum-one
            - bnb-smart-chain
            - ethereum
            - starknet
            - optimism
            - lisk
            - scroll
      required:
        - value
        - asset
        - network
    FiatAmountDto:
      type: object
      properties:
        value:
          type: number
          example: 150000
        currency:
          type: string
          enum:
            - NGN
            - GHS
            - KES
            - USD
      required:
        - value
        - currency
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-API-KEY

````