Retrieve exchange rates
/exchange_ratesRetrieves the exchange rates configured for your account.
- When
transaction_currencyis sent, the response is a singleexchange_rateobject for that currency pair (withoutvalid_until). - Otherwise, the response is an
exchange_ratesobject listing every transaction currency, withvalid_until.
Returns 400 "Exchange rates not configured" when no foreign exchange is set up for your account.
Headers
AuthorizationstringRequiredQuery parameters
transaction_currencystringThe transaction currency code. Three-letter ISO currency code, in lowercase. When sent, only the rate for this currency is returned.
settlement_currencystringThe settlement currency code. Three-letter ISO currency code, in lowercase. Defaults to your account's settlement currency.
networkstringCard 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.
Returns
Returns an exchange_rates object, or an exchange_rate object when transaction_currency is sent.
Option 1objectExchange Rates.
Show 5 child attributesHide child attributes
idstringRequiredUnique identifier for the exchange rates object.
resourcestringRequiredString representing the object's type.
dataarray of objectsRequiredArray of exchange rates, one per transaction currency.
Show 2 child attributesHide child attributes
exchange_rateobjectExchange rates for each operation type.
Show 3 child attributesHide child attributes
chargestringExchange rate applied to charges.
refundstringExchange rate applied to refunds.
payoutstringExchange rate applied to payouts. Present only when consumer payouts are enabled for your account.
transaction_currencystringThree-letter ISO currency code of the transaction, in lowercase.
settlement_currencystringRequiredThree-letter ISO currency code of the settlement, in lowercase.
valid_untilstringRequiredTime until which the exchange rates are valid, as a Unix timestamp in milliseconds.
Option 2objectExchange Rate.
Show 5 child attributesHide child attributes
idstringRequiredUnique identifier for the exchange rate object.
resourcestringRequiredString representing the object's type.
settlement_currencystringRequiredThree-letter ISO currency code of the settlement, in lowercase.
transaction_currencystringRequiredThree-letter ISO currency code of the transaction, in lowercase.
exchange_rateobjectRequiredExchange rates for each operation type.
Show 3 child attributesHide child attributes
chargestringExchange rate applied to charges.
refundstringExchange rate applied to refunds.
payoutstringExchange rate applied to payouts. Present only when consumer payouts are enabled for your account.
Errors
400network missing when your foreign exchange provider requires it.401invalid_key, invalid_token, legacy_keys_ended, legacy_keys_off or permission_denied).403resource_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.404500503Retry-After, or after a few seconds when there's none.