Stripe Checkout Paid But Not Recorded Fix Kit: Fix Webhooks So Paid Orders Get Recorded
Card charged in Stripe but your app never marked the order paid? Get the copy-paste webhook and Checkout Session code, a diagnosis flowchart, 10 AI prompts for Lovable, Bolt, Cursor and v0, and a go-live test plan. Verify the raw body, use the right whsec_ secret, and stop unlocking from /success.
Stripe Checkout runs on Stripe's page. Your app only learns that a payment succeeded when Stripe sends a webhook (an HTTP POST) to your server. AI-built apps often get that handoff wrong: they grant access from the /success page (so a closed tab is never recorded, and anyone who types /success can look paid), they parse the body as JSON before checking Stripe's signature, they use the CLI's webhook secret in production (or a test secret on a live endpoint), or the handler cannot tell which user paid.
This kit fixes it the way Stripe documents it. You verify every event with the exact raw request body and the matching whsec_ secret, fulfill only when the Checkout Session's payment_status is not unpaid, attach the user with client_reference_id, and make fulfillment safe to run more than once. The success page can show a confirmation and even call the same server-side fulfill function, but it is never the only path.
Safety rules the whole kit follows: never grant access only because the customer landed on /success, never skip signature verification or use a parsed body, and never put the Stripe secret key or webhook secret in browser code.
What's inside
PDF guide: why Checkout can show paid while your app does not, and the fix step by step
Diagnosis flowchart: go from "paid in Stripe, nothing in my database" to the right cause (missing webhook, signature failure, wrong secret, unreachable endpoint, missing user id, RLS/database write, or delayed payment method)
Copy-paste TypeScript:
create a Checkout Session with client_reference_id, metadata, and the literal {CHECKOUT_SESSION_ID} success URL
an official-style fulfillCheckout helper (retrieve the Session, honor payment_status, run once per Session)
a Next.js App Router webhook route
notes for Next.js Pages Router, Express, and Supabase Edge Functions (Deno)
a server-side success page that confirms payment without being the only fulfill path
Environment checklist: CLI secret vs Dashboard test/sandbox secret vs live secret
HTTP status cheat sheet: what 404, 401/403, 400, 500, redirects and timeouts mean in Stripe's Event deliveries tab
Idempotency and retries: store event.id, fulfill once per Session, return 2xx quickly; live retries last up to three days
10 copy-paste prompts for Lovable, Bolt, Cursor and v0: they make your AI tool diagnose first, move fulfillment into a verified webhook, and keep secrets on the server
Go-live test plan: Stripe CLI listen and trigger, test card 4242 4242 4242 4242, then a Dashboard endpoint and Workbench deliveries
14-point pre-launch checklist
Files: PDF, a ready-to-adapt .ts file, and a prompts .md file
Who it's for
Vibe coders and indie builders whose Lovable, Bolt, Cursor, v0 or Next.js/Vercel app charges the card but never unlocks the product
Anyone seeing "No signatures found matching the expected signature for payload" or "Webhook signature verification failed"
Founders who granted access from /success and want the reliable path before launch
Useful if you write orders to Supabase and the webhook insert is blocked or unsafe
Fine print
Instant download. Not affiliated with Stripe. Test in a sandbox or with test API keys before using live keys.