How one zero-dependency pricing package keeps displayed and charged amounts identical
A developer at Munchable built a single shared pricing package to ensure the price shown to users is always the price charged — across 24 currencies, a Next.js site, and an Expo mobile app. The package has zero runtime dependencies, preventing the Stripe SDK from being pulled into lightweight landing page components that only need to display a number. All prices derive from a single source-of-truth integer (1000 pence for £10), replacing a previous setup where Stripe's Adaptive Pricing caused the local amount to fluctuate with exchange rates. Hardcoded conversion rates include a 4% buffer to absorb Stripe's settlement fee and rate drift, ensuring £10 in list revenue stays close to £10 after currency conversion. Local prices are then rounded up — to the nearest .99 for decimal currencies, or to a scaled round step for non-decimal ones — so the rounding logic for display and for billing lives in one place.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in