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

# Generate Invoice

> Generate Invoice

Generate an invoice for cross-border payments between different fiat currencies.


## OpenAPI

````yaml POST /api/v3/cross-boarder/invoice
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/cross-boarder/invoice:
    post:
      tags:
        - CROSS BOARDER
      summary: Generate Invoice
      description: Generate Invoice
      operationId: FiatToFiatController_generateInvoice_api/v3
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateInvoiceDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Invoice has been successfully created
                  data:
                    $ref: '#/components/schemas/DepositResponseDto'
                    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:
    GenerateInvoiceDto:
      type: object
      properties:
        currency:
          description: The currency of the invoice
          example: KES
          allOf:
            - $ref: '#/components/schemas/Currency'
        amount:
          type: number
          description: The amount of the invoice
          example: 1000
        bank:
          description: The bank details of the invoice
          example:
            accountName: John Doe
            address: 123 Main St
            phoneNumber: '+254712345678'
            bankCode: 123456
            accountNumber: '1234567890'
            country: Kenya
          allOf:
            - $ref: '#/components/schemas/BankDto'
        referenceId:
          type: string
          description: The reference id of the invoice
          example: 1e476673-0931-4eba-8373-37b368ce59f7
        userReference:
          type: string
          description: The user reference of the invoice
          example: 1e476673-0931-4eba-8373-37b368ce59f7
      required:
        - currency
        - amount
        - bank
        - referenceId
    DepositResponseDto:
      type: object
      properties:
        id:
          type: string
        message:
          type: string
        reference_id:
          type: string
        reference_number:
          type: number
        customer_key:
          type: string
        redirect_url:
          type: string
      required:
        - id
        - message
        - reference_id
        - reference_number
    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
    BankDto:
      type: object
      properties:
        name:
          type: string
          description: Full name
        address:
          type: string
          description: Address
        phoneNumber:
          type: string
          description: Phone number
        bankCode:
          type: number
          description: Bank code
        accountNumber:
          type: string
          description: Account number
        country:
          type: string
          description: Country code (ISO-2 like KE, GH, NG or ISO-3 like KEN, GHA, NGA)
          example: KE
      required:
        - name
        - address
        - phoneNumber
        - bankCode
        - accountNumber
        - country
  securitySchemes:
    JWT:
      scheme: bearer
      bearerFormat: JWT
      type: http

````