Currency display testing is the practice of checking, signal by signal, which currency an online shop shows each visitor and in which format. The site decides from the IP country, the Accept-Language header, a cookie and the country path in the URL. When those signals conflict, the currency can be right and the format still wrong. A Swiss price gets printed in German format. This post covers signal priority, the expected format table, rounding and the currency check on the checkout step.
The signals that pick the currency
The currency decision comes from four signals, and the site should read them in a fixed order. If that order is not written down, a test cannot tell what is correct.
| Signal | Where it comes from | Recommended role |
|---|---|---|
| Cookie or account preference | The user's own choice | Currency, priority 1 |
| Country path in the URL | A prefix such as /ch/ or /de/ | Currency, priority 2 |
| IP country | The connection's exit address | Currency, priority 3 |
Accept-Language | The browser's language setting | Format only |
The order we recommend puts the user's explicit choice first. A visitor who picked francs should keep seeing francs when the IP changes. The URL path comes second, because a shared link should open the same store for everyone. The IP only counts when no explicit signal exists.
Accept-Language should not pick the currency. Language does not tell you the country: German is spoken in Germany, Austria and Switzerland. Its job is the format, meaning the separators and where the symbol goes.
In a test, the only thing that changes the IP signal is the proxy's exit country. With a Residential Proxy that lets you choose the country, you open each market over a connection from that country. Language, cookie and path change in the request itself.
Why the price differs by country is a separate topic. We covered it in our geo-pricing post. This post only tests the display.
Signal conflicts
A conflict is when two signals point to different countries, and most bugs show up here. Write down the expected result for each conflict first, then look for it on screen. The matrix below uses Switzerland as the example. Formats are shown with a sample amount.
| Scenario | Expected currency | Expected format |
|---|---|---|
Swiss IP, de-CH | CHF | CHF 1'234.50 |
Swiss IP, de only | CHF | CHF 1'234.50 |
Swiss IP, fr-CH | CHF | 1'234.50 CHF |
| Swiss IP, EUR in cookie | EUR | EUR 1'299.00 |
German IP, /ch/ path, de | CHF | CHF 1'234.50 |
Türkiye IP, en-US | TRY | TRY 1,234.50 |
The second row is the case most often skipped. Browsers sometimes send just de. If the site passes that value straight to the formatter, the Swiss franc is printed in German format: 1.234,50 CHF. The right way is to take the language from the Accept-Language header and the region from the country signal, then build the de-CH code.
So for German language with a Swiss IP, the answer is CHF. Language only picks the format. If you see EUR here, the site derives the currency from the language.
The last row is a design decision. In an English interface, the Turkish lira appears as the TRY code, not the ₺ symbol. Decide which one you want and put it in the expected table.
Symbol, separators and decimals
The locale code sets the format: where the symbol goes, the thousands separator, the decimal mark and the number of decimal places. These rules live in the Unicode CLDR data. In Node, Intl.NumberFormat reads that data from the ICU library. Do not write the expected table by hand. Generate it from the same data:
// format.mjs: generates expected price formats from CLDR data
const amount = 1234.5;
const cases = [
['tr-TR', 'TRY'], ['de-DE', 'EUR'], ['de-CH', 'CHF'], ['de', 'CHF'],
['fr-FR', 'EUR'], ['es-ES', 'EUR'], ['ja-JP', 'JPY'], ['en-KW', 'KWD'],
];
// Make invisible spaces visible: U+00A0 → ⍽, U+202F → ⎵
const show = s => s.replace(/ /g, '⍽').replace(/ /g, '⎵');
console.log(`Node ${process.version}, ICU ${process.versions.icu}, CLDR ${process.versions.cldr}`);
for (const [locale, currency] of cases) {
const f = new Intl.NumberFormat(locale, { style: 'currency', currency });
console.log(locale.padEnd(6), currency, show(f.format(amount)));
}Output:
Node v24.22.2, ICU 78.3, CLDR 48.0
tr-TR TRY ₺1.234,50
de-DE EUR 1.234,50⍽€
de-CH CHF CHF⍽1'234.50
de CHF 1.234,50⍽CHF
fr-FR EUR 1⎵234,50⍽€
es-ES EUR 1234,50⍽€
ja-JP JPY ¥1,235
en-KW KWD KWD⍽1,234.500The output holds four traps:
- Code without a region.
deandde-CHgive different formats for the same currency. A wrong format usually comes from a missing region. - Invisible spaces.
fr-FRuses a narrow no-break space (U+202F) for thousands and a no-break space (U+00A0) before the symbol. A test that compares against a normal space fails every time. - Four-digit amounts.
es-ESputs no thousands separator in a four-digit amount:1234,50 €, but12.345,50 €. CLDR defines this with theminimumGroupingDigitsrule. - Decimal places. The yen carries no decimals, the Kuwaiti dinar carries three. 1234.5 yen prints as
¥1,235.
The table depends on the version. CLDR updates some formats in new releases. Generate the expected table with the ICU version running on the site's server, and write the version number at the top of the table.
Rounding and price endings
A price converted at an exchange rate does not keep the ending of the base price. A USD 19.99 product multiplied by a sample rate of 0.93 becomes 18,59 €. A price list that ends in .99 scatters into random cents after conversion.
If you have an ending rule, it should be written down: .99 in which currency, .90 in which, whole numbers in which. The test checks that the price shown in each currency follows that rule. Without a rule, mixed endings are the expected result.
Decimal places change the ending too. Because the yen carries no decimals, 2999.5 yen prints as ¥3,000 and the 2,999 ending is lost. Do not leave rounding to the formatter. Round the price to the currency's decimal places beforehand.
The Swiss franc also has cash rounding. CLDR data stores a cashRounding="5" entry for CHF, meaning cash amounts round in steps of 0.05 francs. Intl.NumberFormat does not apply this on its own. It needs the roundingIncrement option:
const cash = new Intl.NumberFormat('de-CH', {
style: 'currency', currency: 'CHF',
minimumFractionDigits: 2, maximumFractionDigits: 2,
roundingIncrement: 5,
});
cash.format(12.33); // "CHF 12.35"
cash.format(12.32); // "CHF 12.30"The default formatter prints the same amount as CHF 12.33. When roundingIncrement takes a value other than 1, the minimum and maximum fraction digits must be equal, or a RangeError is thrown. Which flows need cash rounding is your site's decision. The test only checks that the decision is applied.
Currency on the checkout step
The currency can look right in the cart and change on the payment page. The usual cause is that the checkout step reads the signals differently. The product page reads the cookie, the payment service only looks at the IP. The user picked euros and sees francs on the last step.
When you test this step, run the whole flow from the same IP. If the IP changes between steps, the site may reset the session, and you cannot tell the real bug from one the test caused. With a Sticky Proxy, the exit IP stays fixed for the time you choose, between 1 and 60 minutes.
Check three things on the checkout step. Is the currency the same as on the previous step? Is the total printed in the same format? Does the page state clearly which currency the card will be charged in? Do not use a real card. Work with the payment provider's test mode and test cards.
We listed the checkout and address checks specific to the Türkiye market in our Türkiye IP testing post.
Automated checks over a proxy
Manual checks do not get repeated on every release, so turn the matrix into a script. The script below requests each scenario through the proxy, pulls the price text from the page and compares it with the expected format. The proxy exit is set to a single country, and the script runs that country's scenarios. It needs Node 24 and the undici package (npm i undici).
// check.mjs: compares price text with the expected CLDR format
import { fetch, ProxyAgent } from 'undici';
const proxy = new ProxyAgent(process.env.PROXY_URL); // http://user:pass@pr.proxynet.io:8000
const SITE = process.env.SITE ?? 'https://shop.example';
// Expected results while the proxy exits in Switzerland
const scenarios = [
{ lang: 'de-CH,de;q=0.9', path: '/product/42', currency: 'CHF', locale: 'de-CH' },
{ lang: 'de', path: '/product/42', currency: 'CHF', locale: 'de-CH' },
{ lang: 'fr-CH,fr;q=0.9', path: '/product/42', currency: 'CHF', locale: 'fr-CH' },
{ lang: 'de-CH', cookie: 'currency=EUR', path: '/product/42', currency: 'EUR', locale: 'de-CH' },
{ lang: 'de-CH', cookie: 'currency=EUR', path: '/cart/checkout', currency: 'EUR', locale: 'de-CH' },
];
function matches(text, locale, currency) {
const f = new Intl.NumberFormat(locale, { style: 'currency', currency });
const decimal = f.formatToParts(1.5).find(p => p.type === 'decimal')?.value ?? '.';
const digits = [...text].filter(c => /\d/.test(c) || c === decimal).join('');
return f.format(Number(digits.replace(decimal, '.'))) === text;
}
for (const s of scenarios) {
const res = await fetch(SITE + s.path, {
dispatcher: proxy,
headers: { 'accept-language': s.lang, ...(s.cookie && { cookie: s.cookie }) },
});
const html = await res.text();
const text = (html.match(/data-price[^>]*>([^<]+)</)?.[1] ?? '')
.replace(/ /g, ' ')
.replace(/&#(\d+);/g, (_, n) => String.fromCodePoint(+n))
.trim();
const result = matches(text, s.locale, s.currency) ? 'ok' : 'FAIL';
console.log(result, s.lang, s.cookie ?? '-', s.path, JSON.stringify(text));
}Change the data-price selector, which finds the element holding the price, to match your own site. Run the script like this:
PROXY_URL=http://user:pass@pr.proxynet.io:8000 \
SITE=https://shop.example \
node check.mjsIn PowerShell, set the variables first in the form $env:PROXY_URL = "http://user:pass@pr.proxynet.io:8000". The output from our test store:
ok de-CH,de;q=0.9 - /product/42 "CHF 1'234.50"
FAIL de - /product/42 "1.234,50 CHF"
ok fr-CH,fr;q=0.9 - /product/42 "1'234.50 CHF"
ok de-CH currency=EUR /product/42 "EUR 1'299.00"
FAIL de-CH currency=EUR /cart/checkout "CHF 1'234.50"The comparison runs in reverse. matches() pulls the digits and the expected decimal mark from the text on screen, then formats the number again with the expected code and currency. If the two strings are not identical, the result is FAIL. Symbol, separators, space type and decimal places are all checked in one comparison.
We planted two bugs in our test store on purpose, and the script caught both. The first was passing the region-less de code straight to the formatter. The second was a checkout page that did not read the cookie: the user picked EUR and the checkout step showed CHF.
The comparison is strict. If the site prints a normal space instead of a no-break space, or puts a thousands dot in an es-ES amount, the result is FAIL. If you consider that acceptable, normalize the spaces before comparing and keep the decision in writing.
Debugging
The visible symptom usually points to one wrong signal.
- The currency belongs to another country. The proxy exit is not the country you expect. Check the exit country with an IP lookup page first.
- Right currency, German format. The site uses a locale code without a region. Combine language and country.
- Right on the first request, a different currency after that. The CDN may cache the page without splitting it by country. The first visitor's currency then goes to everyone after.
- Cart right, checkout wrong. The checkout step does not read the cookie or the account preference.
- The script says
FAIL, the screen looks fine. The space type differs. Look at the character codes:[...text].map(c => c.codePointAt(0).toString(16)).
How we tested
We ran the scripts on December 3, 2026, on Windows 11: Node 24.22.2 (ICU 78.3, CLDR 48.0) and undici 8.10.2. The setup had two local parts. The first was an HTTP proxy that required Basic authentication and connected to the target from a separate local exit address. The second was a test store that mapped that address to a country, then picked the currency from the cookie, path and Accept-Language header. We simulated country detection this way and did not use a real Swiss IP. The target was plain HTTP. The format table and rounding results are Node's Intl output.
The bottom line
Pick the currency from the country signal and the format from language plus country. Generate the expected table from the same CLDR data your site uses. For team testing, see our localization page. Above all, test the checkout step: if a currency that looked right in the cart changes on the last step, the user notices it at the exact moment of payment.
Sources
- Intl.NumberFormat() constructor: developer.mozilla.org
- Accept-Language header: developer.mozilla.org
- UTS #35 Part 3: Numbers, Currencies: unicode.org
- Unicode CLDR Project: cldr.unicode.org
Frequently asked questions
Which currency should a German-language visitor with a Swiss IP see?
CHF. The country signal picks the currency, and language only sets the format. German is spoken in both Germany and Switzerland, so language alone does not tell you the country. The correct result is CHF 1'234.50 in de-CH format. If you see EUR, the site derives the currency from language. If you see 1.234,50 CHF, it uses the region-less de code.
Should the currency be chosen from the Accept-Language header?
No. Accept-Language carries the browser's language preference, not the country the visitor is in. Someone using an English browser can be in Türkiye, and someone using a German browser can be in Switzerland. The user's choice, the URL path or the IP country should set the currency. Use the header only to pick the symbol position, the separators and the decimal mark.
Is Intl.NumberFormat output the same in the browser and on the server?
Not always. The output depends on the ICU and CLDR versions of the runtime. Node on your server and the user's browser can ship different versions, and some separators can change between versions. Generate the expected table with the version of the runtime that actually prints the price. In Node, process.versions.cldr and process.versions.icu tell you the version.
Should a price use a normal space or a no-break space?
A no-break space. When CLDR formats put a space between symbol and amount, they use U+00A0, and French thousands separators use U+202F. These characters keep the symbol from breaking away from the amount at a line end. If you see a normal space on the page, the price is formatted by hand. Your comparison test catches the difference, so decide in advance whether to accept it.
Which signal wins when the user changes the currency?
The user's choice. A preference stored in a cookie or the account should override the IP country and the URL path. In the test, set the cookie and change the IP country. The product page, cart and checkout step should all keep the chosen currency. If the checkout step does not read the cookie, the user sees a different currency on the last step.
Which proxy type suits currency testing?
A residential proxy with country selection. Only the exit address changes the IP country signal, so each market needs an exit in that country. For a single-page check, a new IP per request is enough. For a flow that runs from cart to checkout, use a sticky session that holds the IP for 1 to 60 minutes. For regression tests that run for days, a static ISP address is more consistent.




