Currency Conversion

Overview

The Conversions API allows you to convert funds between different currencies within your organization. You can create conversions directly or by using a previously generated quote. The API supports converting between accounts in different currencies, as well as converting into FX settlement batches.


Conversion Object

A Conversion object represents a currency exchange operation. When you request a currency conversion, the system debits your source account, applies the appropriate exchange rate, and credits the destination with the converted amount.


PropertyTypeRequiredDescription
idstring (UUID)✅Unique identifier of the conversion
statestring✅Current state of the conversion (COMPLETED, PENDING, PROCESSING, FAILED, etc.)
status_descriptionstring✅Human-readable description of the conversion status
created_datestring (ISO date)✅Date when the conversion was created
updated_datestring (ISO date)✅Date when the conversion was last updated
completion_datestring (ISO date)❌Date when the conversion was completed (null if not completed)
internal_referencestring✅Internal system reference for the conversion
client_referencestring❌Client-defined unique reference for idempotency or reconciliation
client_metadataobject❌Client-provided metadata associated with the conversion
account_idstring (UUID)✅ID of the source account
source_amountobject✅Amount sold/instructed amount
source_amount.valueinteger✅Amount in minor units (kobo, cents, etc.)
source_amount.currencystring✅Currency code (ISO 4217)
total_feesobject✅Total fees charged
total_fees.valueinteger✅Fee amount in minor units
total_fees.currencystring✅Currency code of the fee
destination_amountobject✅Amount bought
destination_amount.valueinteger✅Amount in minor units
destination_amount.currencystring✅Currency code
destinationobject✅Destination details
destination.typestring✅Type of destination ("account" or "fx_settlement_batch")
destination.idstring (UUID)✅ID of the destination
quote_idstring (UUID)❌ID of the quote used to generate this conversion
fxobject✅Foreign exchange rate details
fx.pairstring✅Currency pair in format "base/quote"
fx.base_currencystring✅Source currency
fx.quote_currencystring✅Destination currency
fx.ratenumber✅Exchange rate applied
descriptionstring✅Description of the exchange
balance_beforeobject✅Account balance before conversion
balance_before.valueinteger✅Balance amount in minor units before the conversion
balance_before.currencystring✅Currency code of the balance
balance_afterobject✅Account balance after conversion
balance_after.valueinteger✅Balance amount in minor units after the conversion
balance_after.currencystring✅Currency code of the balance

FX Object

The fx object provides detailed information about the foreign exchange rate used in a conversion transaction. It specifies how currencies are valued relative to each other and helps interpret the conversion operation correctly.

PropertyTypeRequiredDescription
pairstring✅Currency pair notation showing the exchange relationship in format "base/quote" (e.g., "NGN/USD")
base_currencystring✅The source currency code in the exchange rate pair (the currency being sold). This is the currency of the source account
quote_currencystring✅The target currency code in the exchange rate pair (the currency being bought or exchanged into)
ratenumber✅Exchange rate applied to the conversion. How many units of the base_currency equal 1 unit of the quote_currency.

Understanding Exchange Rates

Rate Interpretation

The rate in the FX object represents how many units of the base_currency equal 1 unit of the quote_currency.

For example, if:

  • base_currency is "NGN"
  • quote_currency is "USD"
  • rate is 1765

This means: 1765 NGN is sold to get 1 USD


Important Note on Precision

The system handles these conversions internally, but it's important to understand that:

  • All amounts in API requests and responses are in minor currency units
  • The precision of the rate can get up to 10 decimals
  • The exchange rate is expressed in major currency units
  • Rounding may occur during conversion, especially when involving currencies with different precision requirements

Currency Pair Notation

The pair property follows the standard foreign exchange notation where:

  • The first currency is the base_currency (the currency you're selling)
  • The second currency is the quote_currency (the currency you're buying)
  • They are separated by a forward slash (e.g., "NGN/USD")

Example FX Object

{
  "pair": "NGN/USD",
  "base_currency": "NGN",
  "quote_currency": "USD",
  "rate": 1765
}

Example Object

{
    "data": {
        "id": "0196b0ff-5102-7f43-8546-8a3adf164e9f",
        "state": "PENDING",
        "status_description": "Conversion waiting to be processed",
        "created_date": "2025-05-08T17:44:04.610Z",
        "updated_date": "2025-05-08T17:44:04.821Z",
        "internal_reference": "wz-exchange-tW3x-1746726244610",
        "client_metadata": {},
        "account_id": "01961ef1-b21c-79ea-a3f3-4764c3b988ba",
        "source_amount": {
            "value": 10000000,
            "currency": "NGN"
        },
        "total_fees": {
            "value": 0,
            "currency": "NGN"
        },
        "destination_amount": {
            "value": 5666,
            "currency": "USD"
        },
        "destination": {
            "type": "account",
            "id": "01961ef1-b21d-718f-8f06-9da328e8361e"
        },
        "balance_before": {
            "value": 1962990243,
            "currency": "NGN"
        },
        "balance_after": {
            "value": 1952990243,
            "currency": "NGN"
        },
        "fx": {
            "pair": "NGN/USD",
            "rate": 1765,
            "base_currency": "NGN",
            "quote_currency": "USD"
        },
        "description": "Currency exchange from NGN to USD"
    }
}

Did this page help you?