Skip to main content
One request from the browser and one changed value on the server. Keep your hard-coded prices. They are the fallback.

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
This returns a map from base Price ID to entry, or null if anything failed.

2. Show the price

Render display. It is already formatted, so never divide amount by 100.
PricingCard.jsx
  • Render the base price immediately and swap in display when the response arrives.
  • When localized is true and discount_percent is above zero, a short “Pricing for ” line is enough. A struck-through base price is optional.
  • In a premium market pay is above 100 and discount_percent is 0. Show display without a discount line.

3. Send the Price ID to your server

Where you create the Checkout Session, Subscription or Payment Intent, use the price from the response instead of the hard-coded ID. Siblings are real Prices in your account.
Stripe charges the sibling in your base currency. 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 your ep_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.