Skip to main content
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

x-app-id
string
header
required

Your application ID from the Breet dashboard

x-app-secret
string
header
required

Your application secret from the Breet dashboard

X-Breet-Env
string
header
required

Environment selector: development or production

Body

application/json
amount
number
required

Amount in the from currency to swap.

Example:

5000

from
enum<string>
required

Currency to swap from. Must differ from to.

Available options:
ngn,
ghs
Example:

"ngn"

to
enum<string>
required

Currency to swap into. Must differ from from.

Available options:
ngn,
ghs
Example:

"ghs"

pin
string
required

Transaction PIN.

Example:

"1234"

Response

Swap completed successfully