exchangerates
endpoint returns a list of foreign exchange rates for every
currency a merchant supports. You cache these rates locally and
use them to display prices in multiple currencies on your website,
app, or kiosk.
For a conceptual overview of MCP and how it differs from DCC, see
What is MCP?.
Before you start
You need the following to request MCP exchange rates:- A DHS host URL provided by your Fexco project manager. See Environments for the full list of base URLs and certificate endpoints.
- An acquirer ID (three-letter alphabetic code assigned by Fexco).
- A merchant ID (Merchant Originator Tag) for an MCP-enabled merchant. The merchant must be boarded with an MCP-enabled template. See Templates.
MCP is supported by Rate Service Classic and ISO. Rate Service Connect does not
support MCP yet. See
Choose a rate API
for a comparison.
Request all exchange rates
The following steps walk through collecting MCP exchange rates, caching them locally, and applying them to product prices.1
Send the request
Send aGET request to the
exchangerates
endpoint. In the URL, replace YOUR_ACQUIRER_ID with your
acquirer ID and YOUR_MERCHANT_ID with the merchant’s
MCP-enabled merchant ID.2
Store the rates locally
Cache the returned rates in your application. Use therate
value to convert product prices from the merchant’s base
currency to each foreign currency for display on your website
or app.Each rate object includes an
expiry timestamp. Do not use
a rate after its expiry. See
Rate expiry for how
to handle expired rates.3
Apply rates to product prices
Multiply each product price in the merchant’s base currency by therate for the cardholder’s chosen currency. Use the
minorUnits field from the foreignCurrency object to
determine the correct decimal precision for the converted
amount.Converted prices display correctly and use the right number
of decimal places for each currency. If the response array
is empty, no currencies are configured for the merchant.
Contact your Fexco project manager to verify the merchant’s
MCP template.
Request rates for specific currencies
If the merchant only needs rates for a subset of currencies, add acurrency query parameter with a comma-separated list of
ISO 4217 currency codes. You can use numeric codes, alphabetic
codes, or a mix of both.
Next steps
- Rate expiry: understand how to handle expired rates and when to refresh.
- What is MCP?: review how MCP works, how it differs from DCC, and how often to refresh rates.
- Choose a rate API: compare Rate Service Classic, Rate Service Connect, and ISO.
- Request a DCC offer (Rate Service Classic): see how DCC rate requests work if your integration needs both DCC and MCP.
