FX rates API
Last updated: 2026-10-29
Read indicative rates
GET /merchant/api/v1/fx/rates
Auth: Secret key
The key selects your merchant account and financial realm. The request does not accept a merchant identifier or a realm parameter. The response lists configured settlement markets; it is not an account-level payment availability catalog.
| Query parameter | Type | Presence | Meaning |
|---|---|---|---|
countryCode | string | Optional | ISO 3166-1 alpha-2 payment-market country filter |
currencyCode | string | Optional | Payment-currency filter |
paymentMethod | enum | Optional | Select pricing for one supported PAYMENT_METHOD_* value, including inherited terms |
amountMinor | string (int64) | Optional | Positive payment amount in payment-currency minor units; range 1 through 9223372036854775807 |
Omitting paymentMethod returns each market's general row and its configured
method-specific rows. A general row omits paymentMethod. Selecting a method
returns its effective pricing even when it inherits the general terms. A price
does not establish that payment creation supports that method or direction.
An omitted amountMinor stays absent; the API assumes no reference amount.
Rates that need an amount or an individual payment can be unavailable. When
currencyCode is omitted, the amount is interpreted independently in each
returned market's payment currency. Use the currency filter when requesting a
rate for a particular payment.
curl -G "https://merchants-api.tcpay.io/merchant/api/v1/fx/rates" \
-H "Authorization: Bearer sk_test_..." \
--data-urlencode "countryCode=KE" \
--data-urlencode "currencyCode=KES" \
--data-urlencode "amountMinor=100000"
Illustrative response; it does not establish account or market availability:
{
"rates": [
{
"countryCode": "KE",
"currencyCode": "KES",
"currencyMinorUnits": 2,
"settlementCurrencyCode": "USDT",
"settlementCurrencyMinorUnits": 6,
"payIn": {
"available": true,
"rate": "130.25",
"sourceAsOf": "2026-10-28T09:00:00Z",
"validUntil": "2026-10-28T09:01:00Z"
},
"payOut": { "available": false }
}
]
}
Response objects
rates is always present and is an empty array when there are no matching
configured settlement markets. No synthetic 1:1 rate is returned for a FIAT
balance. These are the fields of each market row:
| Field | JSON type | Presence | Meaning |
|---|---|---|---|
countryCode | string | Required | Payment-market country |
currencyCode | string | Required | Payment currency |
currencyMinorUnits | integer | Required | Payment-currency exponent, including zero |
settlementCurrencyCode | string | Required | Settlement asset code |
settlementCurrencyMinorUnits | integer | Required | Settlement-asset exponent, from 0 through 18; USDT uses 6 |
paymentMethod | enum | Optional | Pricing method; absent on the general market row |
payIn | object | Required | Independent inbound direction result |
payOut | object | Required | Independent outbound direction result |
Both direction objects have this shape:
| Field | JSON type | Presence | Meaning |
|---|---|---|---|
available | boolean | Required | Whether an indicative rate is available for this direction |
rate | string | When available | Exact decimal payment-currency major units per one settlement-currency major unit |
sourceAsOf | string (date-time) | Optional when available | Time reported by the rate source; omitted when unknown |
validUntil | string (date-time) | When available | Deadline after which this indicative rate must not be used |
When available is false, rate, sourceAsOf, and validUntil are absent.
Do not substitute zero, parity, the other direction's rate, or the response time
for a missing value. Keep decimal rates exact; avoid binary floating-point
rounding in monetary calculations.
Outcomes
- HTTP
400/INVALID_ARGUMENT: invalid filters, an unsupported method value, or an explicit amount outside the positive int64 range. Correct the request. - HTTP
429/RESOURCE_EXHAUSTED: the FX read exceeded its processing limit. No partial rate list is returned. Narrow country, currency, or method filters before trying again. This response does not create a payment. - A missing or unusable rate is normally a direction with
available: false; it is not a confirmed zero rate. Unexpected service failures remain errors.
This read creates no payment, reserves no funds, and locks no quote for a future payment. See FX and USDT settlement for reconciliation and Errors for the error envelope.