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

# Create Onramp

> You can create an onramp request with either mobile money or bank checkout

You can create an onramp request with either mobile money or bank checkout to convert fiat to crypto.


## OpenAPI

````yaml POST /api/v3/onramp
openapi: 3.0.0
info:
  title: KOTANI PAY API PLATFORM
  description: ''
  version: '3.0'
  contact: {}
servers:
  - url: https://preview.kotanipay.com
security: []
tags: []
paths:
  /api/v3/onramp:
    post:
      tags:
        - ONRAMP
      summary: Create Onramp
      description: >-
        You can create an onramp request with either mobile money or bank
        checkout
      operationId: OnrampController_onramp_api/v3
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OnrampDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Request has been successfully created
                  data:
                    $ref: '#/components/schemas/OnrampRequestResponseDto'
                    type: object
        '400':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Bad Request
                  data:
                    type: object
                    example: {}
        '401':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Invalid API Key
                  data:
                    type: object
                    example: {}
      security:
        - JWT: []
components:
  schemas:
    OnrampDto:
      type: object
      properties:
        mobileMoney:
          description: Mobile Money details
          allOf:
            - $ref: '#/components/schemas/MobileMoneyDto'
        bankCheckout:
          description: Bank Checkout details
          allOf:
            - $ref: '#/components/schemas/BankCheckoutDto'
        fiatAmount:
          type: number
          description: Fiat amount
        currency:
          description: The currency of the wallet
          example: eg NGN or GHS or KES
          allOf:
            - $ref: '#/components/schemas/Currency'
        chain:
          description: Chain
          allOf:
            - $ref: '#/components/schemas/Chain'
        token:
          description: Stable Coin
          allOf:
            - $ref: '#/components/schemas/StableCoin'
        receiverAddress:
          type: string
          description: Receiver address
        referenceId:
          type: string
          description: Reference ID
        callbackUrl:
          type: string
          description: Reference ID
        rateId:
          type: string
          description: Rate ID
        fiatWalletId:
          type: string
          description: >-
            Specific fiat wallet ID to use for fiat-to-crypto conversion. If not
            provided, a wallet will be selected automatically based on currency.
      required:
        - fiatAmount
        - currency
        - chain
        - token
        - receiverAddress
        - referenceId
        - callbackUrl
    OnrampRequestResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Onramp ID
        referenceId:
          type: string
          description: Onramp reference ID
        referenceNumber:
          type: number
          description: Onramp reference number
        message:
          type: string
          description: Onramp message
        customerKey:
          type: string
          description: Onramp customer key
        redirectUrl:
          type: string
          description: Onramp redirect URL
      required:
        - id
        - referenceId
        - referenceNumber
        - message
        - customerKey
    MobileMoneyDto:
      type: object
      properties:
        phoneNumber:
          type: string
          description: Phone number
        accountName:
          type: string
          description: Account name
        providerNetwork:
          type: string
          description: >-
            Provider network (Check Payment Providers API for available
            networks)
          example: MTN, VODAFONE, AIRTEL, MPESA
      required:
        - phoneNumber
        - accountName
        - providerNetwork
    BankCheckoutDto:
      type: object
      properties:
        fullName:
          type: string
          description: Full name
        phoneNumber:
          type: string
          description: Phone number
        paymentMethod:
          type: string
          description: Payment method should be CARD OR PAYBYBANK
      required:
        - fullName
        - phoneNumber
    Currency:
      type: string
      enum:
        - KES
        - GHS
        - NGN
        - ZAR
        - ZAR
        - USD
        - XOF
        - ZMW
        - XAF
        - SLE
        - CDF
        - TZS
        - UGX
        - EGP
        - MWK
        - RWF
        - ETB
        - MZN
        - LSL
        - GNF
        - USDT
        - BTC
        - ETH
        - USDC
      description: From currency
    Chain:
      type: string
      enum:
        - ETHEREUM
        - CELO
        - AVALANCHE
        - POLYGON
        - ARBITRUM
        - OPTIMISM
        - STELLAR
        - TRON
        - FUSE
        - LIGHTNING
        - SOLANA
        - PROVENANCE
        - CARDANO
        - HEDERA
        - BASE
        - LISK
        - VICTION
        - SCROLL
      description: The chain of the wallet.Its required if the wallet is a crypto wallet
    StableCoin:
      type: string
      enum:
        - CUSD
        - USDC
        - USDT
        - USDT0
        - SAT
        - BTC
        - HASH
        - FUSE
        - HBAR
        - USDGLO
        - CKES
        - CGHS
        - MSAT
        - XLM
        - ADA
      description: The currency of the wallet
  securitySchemes:
    JWT:
      scheme: bearer
      bearerFormat: JWT
      type: http

````