Use code for programmatic handling. Do not rely on the complete message or HTTP status alone: messages may be sanitized or mapped by the gateway.

GET /v1/fx/rate

Both source_currency and destination_currency are required. Leading and trailing whitespace is removed and letters are converted to uppercase before validation. Each normalized currency code must match [A-Z0-9]{2,16}. Valid format does not guarantee that a currency pair is permitted for the merchant or supported by the exchange rate service. Currency pair permissions are directional. Permission to query USDT to USD does not automatically permit USD to USDT.

FX errors

The validation message uses internal camelCase names; the public query parameter names are source_currency and destination_currency.

Downstream errors

When the exchange rate service returns a business failure, its code is passed through. A timeout or other service call exception is instead converted to fx_rate_query_failed. There is no dedicated fx_rate_pair_not_supported code. A pair that is not permitted for the merchant returns fx_rate_pair_not_allowed; a permitted pair that is unsupported by the exchange rate service normally returns request_parameter_invalid when reported as a business failure.

Authentication and gateway errors

These errors depend on the route and enabled gateway policies. The list is not exhaustive. The underlying service may also return the following codes, depending on authentication and routing:

Failure response example

The top-level timestamp is a Unix timestamp in milliseconds. The data field may be omitted depending on null serialization.