1. Fetch from the browser
Call/v1/price once per page load with every Price ID on the page (up to 50). It must run in the browser: the country comes from whoever makes the request.
pricing.js
null if anything failed.
2. Show the price
Renderdisplay. It is already formatted, so never divide amount by 100.
PricingCard.jsx
- Render the base price immediately and swap in
displaywhen the response arrives. - When
localizedis true anddiscount_percentis above zero, a short “Pricing for ” line is enough. A struck-through base price is optional. - In a premium market
payis above 100 anddiscount_percentis 0. Showdisplaywithout a discount line.
3. Send the Price ID to your server
Where you create the Checkout Session, Subscription or Payment Intent, use theprice from the response instead of the hard-coded ID. Siblings are real Prices in your account.
display is only an estimate for the visitor. With Stripe’s Adaptive Pricing, Checkout may show its own converted amount.
Fallbacks
When EasyPPP is unreachable or has nothing to say, your page must work exactly as it does today.
Responses are
Cache-Control: no-store. Fetch once per page load and keep the result in memory. There is no rate limit.
Keys and environments
Develop with yourep_live_ key. It returns base prices until a card is on file, so customers see no change while you work. For staging checkout, add a Stripe test mode account or sandbox and use its ep_test_ or ep_sbx_ key. A key only returns Prices from its own environment.
From your machine the country is yours. To see a localized result, request from a localized country or ask a teammate in one.