Payment APIs want integers in minor units — 1099 for €10.99 — and half of all currency bugs come from converting between that and a display string. This generates both, side by side, so you can check the round trip.
What you can control
- Three ending styles: charm pricing, round numbers, or exact two-decimal values.
- Minor units are computed correctly per currency, including yen, which has no minor unit at all.
- Discount percentages come with the resulting sale price, for testing strike-through pricing.
- Ten currencies with correct symbols and placement.
What this is not
Conversion between currencies uses fixed indicative rates rather than live ones. Use them for shaping data, never for anything a customer will pay.
Questions
What are minor units?
The smallest unit of a currency, expressed as an integer — cents for dollars, pence for pounds. Payment APIs use them because integers cannot lose precision the way floats can.
Why does JPY have no decimals?
The yen has no minor unit. A hard-coded multiply-by-100 breaks on it, which is why it is worth having in a test batch.
Are the exchange rates current?
No. They are fixed indicative rates for shaping plausible data, and they will drift from the real ones.