Exchange Rates
Preview a conversion
POST
/api/v1/products/exchange-rates/previewConverts an amount between two currencies using the configured rate, without saving anything. Staff-only.
Requires Authorization
ADMIN, SUPPORT only
Authenticated action
Body parameters
amountnumberrequired | Must be greater than or equal to 0. |
fromCurrencystringrequired | e.g. USD. |
toCurrencystringrequired | e.g. CDF. |
Request
curl --request POST \
--url https://api.swiftgoma.com/api/v1/products/exchange-rates/preview \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--data '{
"amount": "<amount>",
"fromCurrency": "<fromCurrency>",
"toCurrency": "<toCurrency>"
}'200Example response
{
"success": true,
"data": {
"amount": 10,
"fromCurrency": "USD",
"toCurrency": "CDF",
"rate": 2800,
"convertedAmount": 28000
}
}