Currency Conversion
With a single endpoint, you can convert between any 2 available currencies.
Authorization
Set to Bearer SECRET_KEY
Content-Type
Set value to application/json
Post a request to the URL below, where the base URL is determined by the environment you are in.
POST: {{baseurl}}/transaction
Param
Required?
Description
"fromAmount"
Yes
This is the amount you want to convert "from
"
"toCurrency"
Yes
This is the currency you want to convert "to
"
"fromCurrency"
Yes
This is the currency you want to convert "from
"
Sample code:
{
"fromAmount": 1000,
"toCurrency": "UGX",
"fromCurrency": "NGN"
}
Sample responses:
{
"success": true,
"message": "new transaction initialized",
"data": {
"conversionTimeInHours": 24,
"transactionReference": "cexxxxx",
"status": "initiated"
}
}
Webhook for Conversions
Supported events for Conversion :
conversion.successful
conversion.pending
conversion.failed
{
"event": "conversion.successful",
"data": {
"transaction": {
"_id": "66xxxxxxxxxxxx",
"transType": "conversion",
"status": "successful",
"fromAmount": 1000,
"toAmount": 1593050,
"fromCurrency": "USD",
"toCurrency": "NGN",
"merchantId": "65xxxxxxxxxx",
"transactionReference": "dbxxxxxxx",
"isRecurrent": false,
"createdAt": "2024-08-25T23:44:33.513Z",
"updatedAt": "2024-08-25T23:44:37.346Z",
"amount": 100000,
"currency": "USD",
"feeAmount": null
},
"authorizationCode": null
}
}
Last updated