We shipped a mini-program into a new market and the price rendered as $9.99. Not because anyone decided to charge dollars — nobody had. A string constant in a shared component had simply survived three rounds of review. The user saw a dollar sign, assumed an unfamiliar currency, and left. The payment rail would have happily charged them in local money. The label was the only thing that lied.

Money looks like the most portable data in your app: a number, a symbol, done. It isn't. A price in a mini-program is a display decision, a legal statement about tax, a promise about what you'll settle in, and a habit borrowed from however people in that market are used to paying. Flatten it into a float and every one of those decisions gets made by accident.

Where the flattening happens

Walk the path from a price in a spreadsheet to a number on a screen. Almost every cheap bug lives at one of these handoffs.

DecisionThe naive moveWhat you actually have to account forWho owns the field
Display symbolHard-code $Symbol position, spacing, decimal and group separatorsThe formatter, never a string constant
Presentment currencyOne global price tablePurchasing power, local price points, whether tax is inside the tagProduct and finance, per market
Settlement currencyAssume it equals what the user sawFX at capture time, payout timing, reconciliationThe payment ledger
RoundingTwo decimals everywhereJPY has no minor unit; some markets expect .99 or round totalsA per-currency rounding rule
InstallmentsShow only the total«3x sem juros» is a display decision, not a maths problemThe local payment method
Amount fieldStore a numberAmount plus its currency code, always, as one valueYour schema

That last row is the one we'd enforce in code review. An amount without its currency is not a number, it's a guess, and guesses compound: one service assumes USD, another multiplies by a rate, and six weeks later finance is reconciling a total nobody can reproduce. Store the pair, and make the type do the arguing for you.

The honest tradeoff

Here's where it gets uncomfortable. You cannot share one price table across markets, and that breaks a genuinely nice idea. A single global number is easy to reason about, easy to discount, easy to put in a config. The moment you localise, you own per-market price points that drift apart, a promotion engine that can't assume a base price, and a support team that has to explain why the same item costs different amounts. We've tried to keep the table global and convert at display time. It buys you a clean codebase and sells you a price that ends in weird digits nobody would ever choose on purpose.

FX is the next bill. The rate at which you show a price, the rate at which a charge is captured, and the rate at which you actually get paid are three different numbers on three different days. If you price in one currency and settle in another, you're running a small treasury operation whether you meant to or not. You can hedge, or you can accept the spread and price in a buffer — but "we'll just use the live rate" is a decision to absorb volatility in your margin, and it should be made out loud.

Local payment methods decide the display, not the other way round. In Brazil, installment count sits next to the price and is part of the offer; in markets where tax is added at checkout, a tax-inclusive tag looks like an error; in others it's the law. Trying to force one presentation across all of them means the interface will be wrong somewhere, and it'll be wrong in the place customers are most sensitive. We'd rather let the payment method own a chunk of the price UI than pretend the price is a pure number.

And there's a maintenance tax nobody mentions: rates, tax rules and rounding conventions change. A formatter handles the separators, yes, but the decisions above it are product decisions with owners, review dates, and a habit of being quietly overridden by a growth experiment. We'd push back on the industry line that "localisation is just translation". Translation is the cheap part. Pricing is where localisation stops being a string problem and starts being a finance problem.

Give every amount a passport

Model money as an amount plus a currency code from the first line of the schema, not as a migration you'll do before the second market. Let a locale-aware formatter own the symbol, the separators and the position, and never let a component concatenate a sign by hand. Keep presentment, capture and settlement as separate fields with their own rates and timestamps, so a reconciliation question has an answer instead of a shrug. Put a per-market price point and a per-currency rounding rule in config that product people can actually read.

Quick test: switch a test account to a locale you don't serve yet and buy something. If you see a lone $, a total with impossible decimals, or a number with no currency attached in the order record, the bug isn't cosmetic. Somewhere downstream, someone is about to be paid the wrong amount, and they'll notice before you do.

Sources