For the complete documentation index, see llms.txt. This page is also available as Markdown.

Price Display and Rounding

The short version: price rounding is not author-configurable in PeakCommerce. There is no rounding mode, decimal-places setting, or price-format option on any product card component, product set item, or pricing rule. What follows is what the platform actually does, so you can predict the output rather than try to configure it.

Money is integer cents

Amounts are stored and computed as whole cents throughout — priceCents, unitPriceCents, listPriceCents, resolvedPriceCents, finalPriceCents. Nothing carries a fractional cent, so there is no accumulation of floating-point drift between the catalog and the order.

Where rounding happens

Rounding occurs inside the pricing engine, at the cent, when a rule adjusts a price:

  • Percentage discount and percentage markup compute the delta and round it to the nearest cent, then add or subtract it.

  • Fixed price override sets the cent value directly — no rounding involved.

  • Tiered pricing uses the matching band's unit price as-is.

  • The resolved price is finally clamped at zero, so a stack of discounts can reach $0.00 but never a negative amount.

Rules apply in sequence, each rounding as it goes. That is the only rounding in the path, and it is fixed behaviour.

How the amount is displayed

Two formatting styles exist, and which one you see depends on the surface:

Journey and product-set cards render a currency symbol from a small fixed map — $ for USD, C$ for CAD, £ for GBP, falling back to $ — followed by the cent value divided by 100 and printed to exactly two decimals. Prices always show two decimal places on these surfaces.

Portal, CSR, and admin surfaces use Intl.NumberFormat with style: "currency". The shared billing formatter pins the locale to en-US and takes the currency from the charge; the market-locale formatter uses the tenant's configured language and currency and falls back to en-US/USD if that combination is rejected. Decimal places therefore follow the currency's own minor-unit convention.

What you can control

On the built-in storefront Product Card, Price and Period are free-text fields. That is the only "formatting control" that exists there: you type the exact string you want displayed, including the symbol and any rounding you have applied yourself.

Gotchas

  • A free-text price does not track the catalog. A storefront card showing $29 keeps showing $29 after the plan's price changes. Prefer a journey pricing block when the number must be correct.

  • The journey symbol map covers USD, CAD, and GBP only; anything else renders with $.

  • Two-decimal formatting is unconditional on journey cards, which is wrong for zero-decimal currencies such as JPY. Do not rely on those surfaces for currencies outside the mapped set.

Last updated

Was this helpful?