Skip to Content
Docs
Exchange rates

Retrieve exchange rates

GET/exchange_rates

Retrieves the exchange rates configured for your account.

  • When transaction_currency is sent, the response is a single exchange_rate object for that currency pair (without valid_until).
  • Otherwise, the response is an exchange_rates object listing every transaction currency, with valid_until.

Returns 400 "Exchange rates not configured" when no foreign exchange is set up for your account.

Headers

AuthorizationstringRequired
HTTP Basic auth: your API key as the password, with an empty username. See Authentication.

Query parameters

transaction_currencystring

The transaction currency code. Three-letter ISO currency code, in lowercase. When sent, only the rate for this currency is returned.

settlement_currencystring

The settlement currency code. Three-letter ISO currency code, in lowercase. Defaults to your account's settlement currency.

networkstring

Card network. One of visa, mastercard, amex, discover, or jcb. Required when your foreign exchange provider prices by network; otherwise rates for visa are returned and the value is ignored.

One of visa, mastercard, amex, discover or jcb.

Returns

Returns an exchange_rates object, or an exchange_rate object when transaction_currency is sent.

Option 1object

Exchange Rates.

Show 5 child attributesHide child attributes
idstringRequired

Unique identifier for the exchange rates object.

resourcestringRequired

String representing the object's type.

One of exchange_rates.

dataarray of objectsRequired

Array of exchange rates, one per transaction currency.

Show 2 child attributesHide child attributes
exchange_rateobject

Exchange rates for each operation type.

Show 3 child attributesHide child attributes
chargestring

Exchange rate applied to charges.

refundstring

Exchange rate applied to refunds.

payoutstring

Exchange rate applied to payouts. Present only when consumer payouts are enabled for your account.

transaction_currencystring

Three-letter ISO currency code of the transaction, in lowercase.

settlement_currencystringRequired

Three-letter ISO currency code of the settlement, in lowercase.

valid_untilstringRequired

Time until which the exchange rates are valid, as a Unix timestamp in milliseconds.

Option 2object

Exchange Rate.

Show 5 child attributesHide child attributes
idstringRequired

Unique identifier for the exchange rate object.

resourcestringRequired

String representing the object's type.

One of exchange_rate.

settlement_currencystringRequired

Three-letter ISO currency code of the settlement, in lowercase.

transaction_currencystringRequired

Three-letter ISO currency code of the transaction, in lowercase.

exchange_rateobjectRequired

Exchange rates for each operation type.

Show 3 child attributesHide child attributes
chargestring

Exchange rate applied to charges.

refundstring

Exchange rate applied to refunds.

payoutstring

Exchange rate applied to payouts. Present only when consumer payouts are enabled for your account.

Errors

400
Invalid request parameters, exchange rates not configured for your account or currency pair, or network missing when your foreign exchange provider requires it.
401
The API key or access token is missing, unknown or no longer works (invalid_key, invalid_token, legacy_keys_ended, legacy_keys_off or permission_denied).
403
The request was refused: the API key may not make it (for example resource_not_allowed, key_disabled, network_not_allowed, pci_required or merchant_required), or this resource isn't enabled for your account (permission_denied). code says why.
404
Exchange rates not found.
500
Internal server error.
503
Service unavailable. Retry after the number of seconds in Retry-After, or after a few seconds when there's none.
Was this page helpful?