How do I keep the prices on my website in sync with Stripe?
By Purlock · Updated 3 min read
The short answer
Keep each price in one place and have every page read it from there, ideally from Stripe itself. You can fetch prices from the Stripe API in your own code, or use a live price tag that shows a value from one source on every page, like Purlock's Live Facts: wrap a price in a small tag, link it to a Stripe price, and when Stripe changes, every page updates within seconds, with no redeploy.
Key points
- Prices drift because they're typed by hand in many places: homepage, pricing page, FAQ, docs, emails.
- Stripe lookup keys let your checkout ask for a price by name, so it can change without code changes.
- Whatever you use, keep the price written in the page as a fallback, so it never shows blank.
Why do website prices get out of sync with Stripe?
A price usually lives in Stripe, where checkout charges it, and again as text on several pages: the homepage, the pricing page, comparison pages, the FAQ, help docs and emails. When the price changes, someone updates Stripe and the pricing page, and the other places get missed.
The result is a customer who sees $19 on the homepage and $24 at checkout. That's lost trust at the worst moment, and in some places a consumer protection problem.
Live prices and sales
Change a price once, and every page updates.
What are the ways to show Stripe prices on a website?
| Approach | Needs a developer? | Updates when Stripe changes? | Risk |
|---|---|---|---|
| Type prices by hand | No | No | Pages drift apart |
| Fetch from the Stripe API at build time | Yes | Only after a rebuild | Stale until the next deploy |
| Fetch from the Stripe API on each request | Yes | Yes | Slower pages, Stripe rate limits |
| Live price tags (like Purlock Live Facts) | No | Yes, within seconds | Needs a small script on the page |
How do live price tags work?
- Wrap each price on your pages in a tag, keeping the current price as its text, for example a span with data-purlock="pro-price" around $19/month.
- Add one script to your site. It loads in the background and fills each tag with the current value.
- Link the fact to a Stripe price by its lookup key, so Stripe decides what it shows.
- Change the price in Stripe, or in Purlock for facts that aren't linked, and every tagged page shows the new value within seconds.
Because each tag keeps the text written in the page, visitors always see a price, even if the script can't load.
What's a Stripe lookup key, and why use one?
A lookup key is a name you give a price in Stripe, like pro_monthly. Your checkout asks Stripe for "the price called pro_monthly" instead of a fixed price ID. Moving the name to a new price changes what checkout charges, with no code change.
That's what makes scheduled sales and price changes safe: the page and the checkout both follow the same name.
How do I find pages where prices already disagree?
Run Purlock's free scan on your homepage. It reads up to 20 of your most important pages, finds every price, and flags plans shown at different prices on different pages, quoting the exact words so you can find them.
More questions
- Does changing a Stripe price change what existing subscribers pay?
- No. Existing subscriptions stay on their price until you move them. New prices apply to new checkouts.
- Can I show prices in several currencies?
- Yes, with a price per currency in Stripe and a fact per price, or a currency aware tag.
- Is it free?
- Purlock's free plan includes 2 live prices. The Prices bundle, 12 US dollars a month, makes every price live and adds scheduled sales.