Guide/Shopify currency conversion

Currency Conversion API for Shopify

Use indicative exchange rates for Shopify reference displays and internal calculations without replacing checkout or settlement pricing.

ERexchangerate.dev·Sep 20, 2026·7 min read

The safe boundary is simple: exchangerate.dev can supply an indicative estimate, while Shopify and the payment provider remain authoritative for checkout, charged currency, fees, refunds, and settlement.

Key points
Do not expose the exchange-rate API key in Liquid or storefront JavaScript.
Fetch through the Shopify app backend or an authenticated app proxy.
Cache one rate snapshot and reuse it across product-card renders.
Label reference conversions as estimates and leave checkout totals to Shopify.

Choose the right boundary for Shopify currency data

Use an external exchange-rate API when an app needs a reference conversion for analytics, a custom dashboard, an editorial calculator, or a clearly labelled estimate. Use Shopify Markets and the payment stack for the price the customer will actually pay.

Fetch rates from the app backend

A theme app extension or storefront component should call your app. Your app calls the currency API, caches the successful response, and returns only the fields the storefront needs. Shopify app proxies are one option when a storefront route must reach the app backend.

typescript · app backend helpercopy
export async function convertForDisplay(amount: number, from: string, to: string) {
  const response = await fetch(
    `https://api.exchangerate.dev/v1/convert/${from}/${to}/${amount}`,
    {
      headers: { Authorization: `Bearer ${process.env.EXCHANGERATE_API_KEY}` },
      signal: AbortSignal.timeout(5000),
      next: { revalidate: 60 },
    },
  );
  if (!response.ok) throw new Error(`FX API returned ${response.status}`);
  const data = await response.json();
  return { amount: data.converted, currency: to, observedAt: data.data_updated_at };
}

Label the estimate honestly

  • Say “estimated” or “reference conversion” beside the amount.
  • Show the target currency and observation time where space permits.
  • Do not promise that checkout will use the same rate.
  • Do not overwrite Shopify product prices every minute from an indicative feed.

Keep storefront failure boring

If the rate service is unavailable, show the shop currency rather than zero, a placeholder conversion, or a made-up value. A cached last-good estimate may be acceptable if it remains visibly labelled with its original observation time.

Checkout is authoritative
Shopify, the payment provider, and the store configuration decide the executable customer total. An indicative FX API should not replace that quote.
ER
exchangerate.dev
Practical integration guides for developers working with currency data.

Keep reading

GuideCurrency Converter API for DevelopersRead GuideWooCommerce currency conversionRead GuideIndicative versus executable FX ratesRead