Guide
Stripe payments work in test mode but fail on the live site
You tested checkout with 4242 4242 4242 4242 and everything worked. Then a real customer pays and the checkout errors, or the payment goes through but nothing unlocks in the app. That's the most expensive dead end there is: the customer paid and got nothing.
Why it happens
Stripe has two separate worlds, test and live. Almost everything must be set up twice, and AI builders usually only set up test mode.
Check these four things
- Live keys. The app must use the live publishable key (
pk_live_…) and live secret key (sk_live_…) on the published site, not the test ones. - The live webhook. Many apps unlock the purchase when Stripe calls them back (a webhook). The webhook you made in test mode doesn't exist in live mode. In the Stripe dashboard, switch to live, open Webhooks, and add the same endpoint with the same events.
- The live webhook secret. The new live webhook has its own signing secret (
whsec_…). Update it in your app's settings; with the test secret, every live callback is rejected. - Return addresses. The "success" and "cancel" pages after checkout must point to your live domain, not the preview.
Test it for real
Buy the cheapest thing yourself with a real card, check it unlocked, then refund yourself from the Stripe dashboard.
Before real customers do it for you
Paste your app's link at vibe-fixer.com: an AI agent goes through your app like a first customer and tells you how many problems it finds. Free, no account.
Still stuck?
Paste your app’s link for a free test — no account. Your AI agent goes through it like a first customer, shows you what breaks, then fixes it while you watch.