Currency Conversion API
Initiate Currency Conversion
To start a currency conversion, you need to get the exchange rate for the currency pair you're exchanging. After you get the exchange rate for the currency pair, you can start the conversion by making a POST request to the Initiate Currency Conversion endpoint;
{{baseurl}}/api/v1/conversions/
The request body should have the following parameters:
Field | Data Type | Description |
---|---|---|
rate_reference | required | A string to reference the rate that was gotten for the amount |
amount | required | The amount to be converted |
from_currency | required | The currency in which the user is converting from |
to_currency | required | The currency in which the user wants to convert to |
customer_name | required | Name of customer initiating |
customer_email | Optional | Email of the customer initiating |
narration | Optional | Description |
{
"converted_amount": "47.82",
"source_amount": "90000.00",
"destination_currency": "USD",
"exchange_rate": "1882.10",
"reference": "sample-reference-xxxxxx",
"source_currency": "NGN",
"status": "success"
}
An email notification will also be sent to you immediately after the currency conversion is done.
Always ensure that you have sufficient funds in the available balance of the currency you want to convert from.
Retrieving Currency Conversion Transaction
You can retrieve a currency conversion transaction to get the status and the details of the transaction using the transaction reference.
To do this, make a GET request to the Retrieve conversion transaction endpoint;
{{baseurl}}/api/v1/conversions/:reference
The request body should have the following parameters:
Field | Data Type | Description |
---|---|---|
reference | string | Required |
status
message
data
reference
source_currency
destination_currency
exchange_rate
source_amount
converted_amount
channel
status
customer_name
customer_email
narration
transaction_date
...
Fetching Currency Conversion Transaction History
You can retrieve the history of your currency conversion transactions for a period using the Conversion History endpoint.
To do this, make a GET request to the Conversion history endpoint with the desired period;
{{baseurl}}/api/v1/conversions
The request body should have the following parameters:
Field | Data Type | Description |
---|---|---|
Date | String | Required- Specific date or date range (start date & end date) |
Limit | string | Required- Number of logs to return (Default value: 20 ,Maximum Value: 100) |
Page | string | Required- Page number of the requested page (Default value: 1) |
status
message
data[]
reference
source_currency
destination_currency
exchange_rate
source_amount
converted_amount
channel
status
customer_name
customer_email
narration
transaction_date
...
Updated 2 months ago