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

# Get Public Exchange Rate

> Public endpoint for getting exchange rates between two currencies. Used for payment link checkout currency conversion display.

Get the exchange rate between two currencies without authentication. Used for payment link checkout currency conversion display.


## OpenAPI

````yaml GET /api/v3/public/rate/{from}/{to}
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/public/rate/{from}/{to}:
    get:
      tags:
        - PUBLIC RATES
      summary: Get public exchange rate (no auth required)
      description: >-
        Public endpoint for getting exchange rates between two currencies. Used
        for payment link checkout currency conversion display.
      operationId: PublicRateController_getPublicRate_api/v3
      parameters:
        - name: from
          required: true
          in: path
          description: Source currency code (e.g., USD, KES)
          schema:
            type: string
        - name: to
          required: true
          in: path
          description: Target currency code (e.g., KES, USD)
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Available exchange rate.
                  data:
                    $ref: '#/components/schemas/RateResponseDto'
                    type: object
        '404':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Exchange rate not found
                  data:
                    type: object
                    example: {}
components:
  schemas:
    RateResponseDto:
      type: object
      properties:
        from:
          type: string
          description: From currency
          example: USD
        to:
          type: string
          description: To currency
          example: EUR
        value:
          type: string
          description: Rate value
          example: '0.85'
      required:
        - from
        - to
        - value

````