Exchange rate API

You can use the exchange rate API to get the latest rate for any currency pair. It can be used on its own or before starting a currency conversion. However, fetching the exchange rate is a prerequisite to initiating a currency conversion transaction.

To get the latest exchange rate for a currency pair, make a POST request to the exchange rate endpoint;

{{baseurl}}/api/v1/conversions/rates

The request body should have the following parameters:

FieldData TypeDescription
from_currencyrequiredThe currency in which the user is converting from
to_currencyrequiredThe currency in which the user wants to convert to
amountrequiredThe amount to be converted
referencerequiredA string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile the conversion
{
    "from_currency": "NGN",
    "to_currency": "USD",
    "from_amount": 90000,
    "to_amount": 47.82,
    "rate": 1882.1,
    "reference": "sample-reference-xxxxxx",
    "expiry_in_seconds": 40
}