Skip to main content
GET
/
v1
/
fx
/
convert
Get a live FX rate (informational)
curl --request GET \
  --url https://stablepay-money-api-production.up.railway.app/v1/fx/convert \
  --header 'Authorization: Bearer <token>'
{
  "convertedAmount": "10.680000",
  "exchangeRate": "128.218000",
  "payoutFee": "20.250000",
  "expiresAt": "2024-01-15T10:31:30.000Z"
}

Authorizations

Authorization
string
header
required

Stablepay API key. Include as Authorization: Bearer <key>.

Query Parameters

amount
number
required

Amount to convert.

Example:

1350

sourceCurrency
enum<string>
required

Stablecoin sent onchain for payment settlement.

Available options:
USDC,
USDT
destinationCurrency
enum<string>
required

Fiat currency received by the recipient.

Available options:
GHS,
KES,
NGN,
TZS,
UGX,
XAF,
XOF,
ZAR,
ZMW
paymentMethod
enum<string>
required

How the recipient receives funds.

Available options:
BANK,
MOMO,
PAYBILL,
TILL
optionalIssuerFee
enum<string>
required

Optional wallet issuer fee.

Available options:
YES,
NO

Response

Indicative FX rate and fee breakdown for the requested corridor.

convertedAmount
string
required

Total converted amount in the destination currency (inclusive of network fee, optional issuer fee and payout fee).

Example:

"10.500000"

exchangeRate
string
required

Market exchange rate sourced from local liquidity partners (inclusive of network fee and optional issuer fee).

Example:

"128.218000"

payoutFee
string
required

The payout fee comprises the mobile network operator or bank processing fee.

Example:

"20.250000"

expiresAt
string<date-time>
required

Timestamp after which this rate should be considered stale.

Example:

"2024-01-15T10:31:30.000Z"