If you accept international payments, you are paying a hidden tax every single day. Payment processors like Stripe and PayPal apply their own exchange rate markups -- typically 1% to 3% on top of the mid-market rate -- and most merchants never question the numbers. By integrating an independent currency exchange rates API into your payment stack, you can see exactly what the mid-market rate is, decide whether to absorb or pass on conversion costs, and give your customers transparent pricing that builds trust.
This guide walks through why you need your own rate source, how the major gateways handle foreign exchange behind the scenes, and step-by-step integration patterns for Stripe, PayPal, and general payment flows.
Why Payment Gateways Mark Up Exchange Rates
Every time a customer in Tokyo pays for a product priced in USD, a currency conversion happens somewhere in the chain. The gateway, the card network, or the issuing bank applies a spread -- the difference between the real interbank rate and the rate the customer actually pays.
| Provider | Markup Over Mid-Market | Update Frequency | Transparency |
|---|---|---|---|
| Stripe | ~1% (varies by currency pair) | Internal, not published | Low -- rate shown only at settlement |
| PayPal | 1.5%--3.5% | Internal | Medium -- shown at checkout but not negotiable |
| Wise Business | 0.3%--0.6% | Real-time | High |
| Adyen | 0.5%--1.2% | Near real-time | Medium |
| Your own API source | 0% (mid-market reference) | You control | Full |
The issue is not that markups exist -- gateways need to cover their own FX risk. The issue is that you have no way to audit or compare those markups unless you have an independent reference rate from a currency exchange rates API.
What an Independent Rate Source Gives You
- Rate auditing. Compare the rate your gateway charged against the mid-market rate at the same timestamp.
- Dynamic pricing. Pre-convert prices on your storefront using real-time rates and display local currency amounts.
- Settlement optimization. Decide when to convert based on rate movements rather than accepting the automatic daily settlement rate.
Integration Pattern: Stripe Multi-Currency Checkout
Step 1: Fetch the Current Rate
curl -X GET "https://exchange-rateapi.com/api/v1/rates?from=USD&to=JPY&amount=49.99" \
-H "Authorization: Bearer YOUR_API_KEY"
Step 2: Create a PaymentIntent in the Customer's Currency
import stripe
stripe.api_key = "sk_live_..."
# Use the rate from Exchange Rate API to price in JPY
jpy_amount = 7648 # Stripe expects integer for zero-decimal currencies
intent = stripe.PaymentIntent.create(
amount=jpy_amount,
currency="jpy",
metadata={
"base_currency": "USD",
"base_amount": "49.99",
"fx_rate": "153.0012",
"fx_source": "exchange-rateapi",
"fx_timestamp": "2026-05-21T10:30:00Z"
}
)
Step 3: Monitor the Spread
# Your recorded mid-market rate
api_rate = 153.0012
# Stripe's effective rate (from balance transaction)
stripe_rate = jpy_amount / settlement_usd_amount
spread_pct = ((stripe_rate - api_rate) / api_rate) * 100
print(f"Stripe markup: {spread_pct:.2f}%")
Integration Pattern: PayPal Adaptive Payments
// Fetch rate client-side (or server-side and pass to template)
const res = await fetch(
"https://exchange-rateapi.com/api/v1/rates?from=USD&to=GBP&amount=79.00",
{ headers: { "Authorization": "Bearer YOUR_API_KEY" } }
);
const data = await res.json();
document.getElementById("local-price").textContent =
"Approximately " + data.result.toFixed(2) + " GBP at today's mid-market rate";
Choosing Your Settlement Currency
| Revenue Share in Foreign Currency | Recommended Strategy |
|---|---|
| < 10% | Settle everything in base currency -- the convenience outweighs the markup. |
| 10%--30% | Hold top 2--3 currencies, convert weekly using rate alerts. |
| > 30% | Full multi-currency treasury management with a currency exchange rates API feeding your conversion decisions. |
Handling Rate Expiry and Guaranteed Quotes
Approach 1: Short TTL with buffer. Fetch rates every 60 seconds (Exchange Rate API updates every 60 seconds) and add a 0.5% buffer.
Approach 2: Lock at intent creation. Fetch the rate, create the PaymentIntent immediately with the converted amount, and set capture_method: "manual".
Implementation Checklist
- Rate caching with a TTL matching your API's update frequency (60 seconds for Exchange Rate API)
- Fallback logic if the API is temporarily unreachable
- Metadata logging on every transaction (rate, source, timestamp)
- Weekly spread analysis comparing your reference rate to gateway settlement rates
- Compliance review -- some jurisdictions require you to disclose the exchange rate applied at checkout
Getting Started
Exchange Rate API provides the rate data that makes all of this possible. The free tier gives you enough requests to prototype and validate the approach. Key advantages for payment gateway integration:
- 60-second updates mean your displayed prices are never stale.
- 160+ currencies cover every market Stripe and PayPal support.
- Reuters and central bank sourcing gives you audit-grade data for compliance.
- Simple REST API with convert, latest, historical, and time-series endpoints.
Sign up for a free API key at exchange-rateapi.com/pricing and start auditing your payment gateway's FX markups today. Full endpoint documentation is available at exchange-rateapi.com/docs.
Start building in seconds
npm install @exchangerateapi/sdk
Stop Overpaying on FX
Audit your payment gateway's exchange rate markups with real-time mid-market data. 160+ currencies, 60-second updates, Reuters-sourced.
Get Your Free API Key →