Foreign Currency Refunds: Which Exchange Rate to Use and What to Store
6 min read
A customer paid 100.00 GBP last month. Today you need to refund them, and the pound has moved against your reporting currency. Which exchange rate do you use for the foreign currency refund?
The short answer: refund the customer in the currency they paid, for the amount they paid, with no new conversion. Then reverse your ledger entry at the rate you recorded when the payment happened. The difference between that old rate and today's market, if any, is an FX effect for your accounting team, not something to pass on to the customer or to hide in a rounding step.
This article explains why, walks through the common scenarios, and shows what to store at payment time so that a refund months later is a simple lookup instead of an argument. It is general engineering guidance, not accounting or tax advice. Check your local rules and your accountant's policy.
Why a refund should not use today's rate
A refund undoes a payment. The customer's side of that payment was an amount in one currency, so the clean undo is the same amount in the same currency.
If you re-convert at today's rate, you create problems:
- The customer gets a different amount than they paid. They paid 100.00 GBP and see 97.40 GBP come back because the rate moved. That produces support tickets and chargebacks.
- Your records stop matching. The original invoice, the payment and the refund no longer describe the same money.
- Everyone has to explain the gap. Somebody has to decide whether the difference is a loss, a gain or an error.
So the customer-facing rule is simple: same currency, same amount. The only question left is how your own books, in your reporting currency, record the reversal.
Three scenarios and the rate for each
What "currency" means depends on how you charge. Most setups fall into one of these:
| Scenario | What the customer gets back | Rate for the ledger reversal |
|---|---|---|
| Charged in the customer's currency (presentment currency), booked in your reporting currency | The same amount in their currency | The rate stored at payment time |
| Charged in your own currency, with a display-only local price | The same amount in your currency | None, there was no conversion to reverse |
| Invoice issued in a foreign currency, paid later | A credit note in the invoice currency | The rate stored on the invoice, plus the rate at payment if you recorded one |
The second row matters for e-commerce. If the local price was only a display estimate and the charge happened in your base currency, the customer's card statement shows your currency, and their bank handles the conversion. Refunding in your currency is correct there too. For the checkout side of this, see how to lock an exchange rate at checkout.
For the invoice side, which exchange rate to use on a foreign currency invoice covers what a credit note should reference.
What to store at payment time
You cannot rebuild the original rate reliably later, so capture it when the payment is made. GetRatesAPI returns current rates only (no historical or time-series lookups), which makes this a design requirement: snapshot what you used.
A practical record per payment:
{
"payment_id": "pay_1042",
"charged_currency": "GBP",
"charged_minor": 10000,
"reporting_currency": "EUR",
"booked_minor": 11620,
"rate": "1.1620",
"rate_as_of": "2026-10-20T09:15:00Z",
"rate_status": "fresh",
"rate_type": "direct",
"markup": "0"
}
Why each field earns its place:
- Amounts in minor units (pence, cents) as integers, so there is no rounding drift. See currency decimal places and minor units for how many digits each currency uses.
rateas a string. GetRatesAPI returns rates as JSON strings. Keep them as strings or decimals in storage, never floats.rate_as_of,rate_statusandrate_type. These come straight from the API response and tell an auditor how fresh and how direct the rate was. A derived rate'sas_ofis its oldest input.booked_minor. The amount you actually posted. Store the result instead of recomputing it, because rounding rules can change.
If you add a margin on top of the market rate, store that too. See how to add a margin to live rates correctly.
Partial refunds without losing a cent
Full refunds are easy: reverse the entire booked amount. Partial refunds are where cents disappear. If you refund 25.00 GBP of a 100.00 GBP payment three times, rounding each reversal independently can leave you a cent off.
The fix is proportional reversal for all but the last refund, and "whatever remains" for the final one:
from decimal import Decimal, ROUND_HALF_EVEN
def ledger_reversal(refund_minor, charged_minor, booked_minor,
refunded_so_far, reversed_so_far):
"""Return the amount (in reporting-currency minor units) to reverse."""
if refunded_so_far + refund_minor == charged_minor:
# Final refund: reverse exactly what is left, so totals match.
return booked_minor - reversed_so_far
share = Decimal(booked_minor) * refund_minor / charged_minor
return int(share.quantize(Decimal(1), rounding=ROUND_HALF_EVEN))
# Payment: 10000 pence booked as 11620 euro cents (example rate 1.1620)
print(ledger_reversal(2500, 10000, 11620, 0, 0)) # 2905
print(ledger_reversal(7500, 10000, 11620, 2500, 2905)) # 8715 (the remainder)
The proportional share uses the stored booked amount rather than the rate, so the reversal always ties back to what you posted. Rounding the final refund as a remainder guarantees that the sum of all reversals equals the original booking. For more on why this is done with decimals and not floats, read currency conversion rounding without floating-point errors.
Where a live rate still helps
Once the original rate is stored, a live rate is useful for the things that are about now, not then:
- Showing the merchant the current value of pending refunds in the reporting currency, for example a queue of open refund requests in GBP, USD and JPY.
- Estimating FX exposure on refunds you owe, using the same total-in-one-currency approach as in a multi-currency dashboard.
- Cases where no original rate exists, such as legacy payments imported without one. Label the result clearly as an estimate and flag it for review.
A single exact conversion is one call to the convert endpoint, which costs 1 request unit:
curl -s "https://api.getratesapi.com/v1/convert?from=GBP&to=EUR&amount=100.00" \
-H "Authorization: ApiKey $GETRATESAPI_KEY"
The response includes converted_amount as an exact decimal string. Results are not rounded, so round it yourself to the reporting currency's minor unit before displaying it. If you are converting a queue of refunds from several currencies into one, fetch up to 20 quotes against a base in one request with GET /v1/rates/{base}?quote=EUR,GBP,JPY, which still costs 1 unit. Details are in the convert endpoint docs.
Check status before showing a figure. A stale rate is flagged rather than withheld, so your code decides whether to show it with a warning or wait for a fresher one.
Common pitfalls
- Re-converting on refund. Changes what the customer receives. Avoid it unless the customer explicitly paid in a currency you no longer support, and then handle it as a manual case.
- Refunding to a different currency than the charge. Card networks and banks generally expect the original currency. Mismatches cause failed or confusing refunds.
- Storing only the converted total. Without the rate, its timestamp and the original amounts, you cannot explain the booking later.
- Storing amounts as floats. A stray
0.1 + 0.2problem becomes a reconciliation problem. - Ignoring refund deadlines. Payment processors limit how long after a charge you can refund. Your records should store the charge date alongside the rate date.
- Mixing display rates with booked rates. The price shown on a product page and the rate booked at payment can differ. Only the second one matters for the ledger.
Try it with your own payment data
The pattern is the same everywhere: snapshot the rate and the amounts at payment time, refund in the original currency, and reverse the ledger from the stored record. Live rates fill in the "what is it worth now" questions.
You can try rates and conversions in the dashboard playground on the free plan, no credit card needed: create a free account. Check the pricing page when you want to size a plan, and see the authentication docs for how to send your key.