curl --request POST \
--url https://api.breet.io/v1/payments/swap-currency \
--header 'Content-Type: application/json' \
--header 'X-Breet-Env: <api-key>' \
--header 'x-app-id: <api-key>' \
--header 'x-app-secret: <api-key>' \
--data '
{
"amount": 5000,
"from": "ngn",
"to": "ghs",
"pin": "1234"
}
'{
"message": "currency swap successful",
"success": true,
"data": {}
}Payments
Swap Fiat Currency
Swap fiat balance between NGN and GHS in either direction. The from and to currencies must be different.
POST
/
payments
/
swap-currency
curl --request POST \
--url https://api.breet.io/v1/payments/swap-currency \
--header 'Content-Type: application/json' \
--header 'X-Breet-Env: <api-key>' \
--header 'x-app-id: <api-key>' \
--header 'x-app-secret: <api-key>' \
--data '
{
"amount": 5000,
"from": "ngn",
"to": "ghs",
"pin": "1234"
}
'{
"message": "currency swap successful",
"success": true,
"data": {}
}Authorizations
Your application ID from the Breet dashboard
Your application secret from the Breet dashboard
Environment selector: sandbox or production
Body
application/json
Amount in the from currency to swap.
Example:
5000
Currency to swap from. Must differ from to.
Available options:
ngn, ghs Example:
"ngn"
Currency to swap into. Must differ from from.
Available options:
ngn, ghs Example:
"ghs"
Transaction PIN.
Example:
"1234"
Response
Swap completed successfully
Was this page helpful?