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

# Pay Invoice

> Pay Invoice

Pay an invoice for cross-border payments.


## OpenAPI

````yaml POST /api/v3/cross-boarder/invoice/pay
openapi: 3.0.0
info:
  title: KOTANI PAY API PLATFORM
  description: ''
  version: '3.0'
  contact: {}
servers:
  - url: https://sandbox-api.kotanipay.io
    description: Sandbox
security: []
tags: []
paths:
  /api/v3/cross-boarder/invoice/pay:
    post:
      tags:
        - CROSS BOARDER
      summary: Pay Invoice
      description: Pay Invoice
      operationId: FiatToFiatController_payInvoice_api/v3
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PayInvoiceDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Invoice successfully retrieved
                  data:
                    $ref: '#/components/schemas/PayInvoiceResponseDto'
                    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:
    PayInvoiceDto:
      type: object
      properties:
        amount:
          type: number
          description: The amount of the invoice
          example: 1000
        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: The currency of the invoice
          example: KES
        referenceId:
          type: string
          description: The reference id of the invoice
          example: 1e476673-0931-4eba-8373-37b368ce59f7
        mobileMoney:
          description: The mobile money details of the invoice
          example:
            accountName: John Doe
            phoneNumber: '+254712345678'
            providerNetwork: MTN
          allOf:
            - $ref: '#/components/schemas/MobileMoneyDto'
      required:
        - amount
        - currency
        - referenceId
        - mobileMoney
    PayInvoiceResponseDto:
      type: object
      properties:
        invoice:
          description: The invoice details
          example:
            amount: 1000
            currency: KES
            status: PENDING
          allOf:
            - $ref: '#/components/schemas/PayInvoice'
        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: The currency of the invoice
          example: KES
        amount:
          type: number
          description: The amount of the invoice
          example: 1000
        referenceId:
          type: string
          description: The reference id of the invoice
          example: 1e476673-0931-4eba-8373-37b368ce59f7
        status:
          type: string
          enum:
            - RETRY
            - PENDING
            - SUCCESSFUL
            - FAILED
            - CANCELLED
            - REVERSED
            - IN_PROGRESS
            - INITIATED
            - ERROR_OCCURRED
            - DECLINED
            - EXPIRED
            - REQUIRE_REVIEW
            - NOT_INITIATED
            - TRANSACTION_INITIATED
            - TRANSACTION_RETRY
            - TRANSACTION_RETRY_SUCCESSFUL
            - TRANSACTION_RETRY_FAILED
          description: The status of the invoice
          example: PENDING
      required:
        - invoice
        - currency
        - amount
        - referenceId
        - status
    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
    PayInvoice:
      type: object
      properties:
        amount:
          type: string
          description: The amount of the invoice
          example: 1000
        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: The currency of the invoice
          example: KES
        status:
          type: string
          description: The status of the invoice
          example: PENDING
      required:
        - amount
        - currency
        - status
  securitySchemes:
    JWT:
      scheme: bearer
      bearerFormat: JWT
      type: http

````