1. Currency Conversion
CharrgRate
  • Charrg Rates
    • Currency Conversion
      • Convert a specified source amount
        GET
      • Calculate the source equivalent of a target amount
        GET
    • Currency Information
      • List available currencies
    • Schemas
      • ConvertFromResponse
      • ConvertToResponse
      • Rate
      • ErrorResponse
      • CurrencyInfoResponse
      • CurrencyInfo
  1. Currency Conversion

Calculate the source equivalent of a target amount

GET
/v1/convert_to
Use when a target amount is known in the destination currency. The response contains the target currency in to and one source-currency equivalent in each from[] entry. Each from[].mid is the source amount corresponding to the requested target amount. The source-per-target unit value is from[].mid / amount; the target-per-source value is amount / from[].mid. Pricing is managed by LEOGC; from, to, and amount are required; inverse and decimal_places are optional customer query parameters. Use returned values according to your agreed payment workflow. This read-only operation does not execute a payment or create a guaranteed, stored quote. All numeric examples are illustrative and independent of the other operation examples. The string values in terms and privacy are placeholders for the service metadata.

Request

Authorization
API Key
Add parameter in header
Ocp-Apim-Subscription-Key
Example:
Ocp-Apim-Subscription-Key: ********************
or
Query Params

Responses

🟢200
application/json
Successful conversion. mid is an amount in the entry's quotecurrency.
Headers

Bodyapplication/json

🔵304
🟠400
🟠401
🟠403
🟠429
🔴500
Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/v1/convert_to?from=USD&to=GHS&amount=1000&inverse=false&decimal_places=6' \
--header 'Ocp-Apim-Subscription-Key: <api-key>'
Response Response Example
200 - Illustrative result - not a live rate
{
    "terms": "string",
    "privacy": "string",
    "to": "GHS",
    "amount": 1000,
    "timestamp": "2026-09-24T12:05:00Z",
    "from": [
        {
            "quotecurrency": "USD",
            "mid": 110
        }
    ]
}
Modified at 2026-09-24 15:39:30
Previous
Convert a specified source amount
Next
List available currencies
Built with