Guides · Free check · $9 fix pack

Stripe webhook guides

Short, sourced fixes for the bugs that make customers pay and not get access. Every claim links to the official docs.

Stripe webhook not working? Check these 7 things in order

Why Stripe events never reach your app (redirects, auth walls, wrong secret, slow handlers) and how to confirm each one in minutes.

A customer paid but didn't get access. What went wrong?

If buyers pay through Stripe Checkout but your app never unlocks, fulfillment is probably tied to the success page or a failing webhook. Here's the fix.

No signatures found matching the expected signature for payload

Stripe says this error means the raw body, the Stripe-Signature header or the whsec_ secret is wrong. Fixes with code for Next.js, Express and Supabase.

Stripe webhook failing with a 307 or 308 redirect

A 307 or 308 in your Stripe event deliveries means the URL redirects (www, https or trailing slash). Stripe counts redirects as failed deliveries. Use the final URL.

Stripe webhook on Supabase Edge Functions: fixing 401s and signature errors

If your Lovable or Bolt app uses Supabase Edge Functions for Stripe, 401 errors mean JWT verification is on, and signature errors need constructEventAsync.

Supabase Edge Function 401 on your Stripe webhook

Stripe webhooks to a Supabase Edge Function fail with 401 when the built-in JWT check is on. Turn it off for that function and verify the Stripe signature instead.

Next.js Stripe webhook: getting the raw body (App Router and Pages Router)

Stripe needs the raw request body to verify webhooks. In the App Router use await req.text(); in the Pages Router set bodyParser: false and read a buffer. Working code.

Vercel Deployment Protection is blocking your Stripe webhook

Vercel Deployment Protection puts preview (and sometimes production) URLs behind a login Stripe cannot pass. Use the production domain or Protection Bypass for Automation.

Using the test webhook secret in production

Going live with the test whsec_ (or the Stripe CLI secret) makes every real payment fail verification. How to spot it and switch safely.

Stripe sent the same webhook twice. Now what?

Stripe can deliver the same event more than once and in any order. Store event IDs, check session state, and make fulfillment safe to repeat.

Can someone fake a payment to your app?

If your webhook doesn't verify the Stripe-Signature header, anyone with the URL can post a fake checkout.session.completed and unlock your product.

Stripe says the subscription changed, but your app still shows the old plan

Stripe shows the subscription active, upgraded or canceled, but your database still has the old status. The events to handle, the ID to store, and how to resync.

Cloudflare is blocking your Stripe webhook (403, challenge page or Access login)

Stripe deliveries fail with a 403 or 302 and your code never runs? Cloudflare Bot Fight Mode, a challenge rule or Cloudflare Access is answering first. Find which one and exempt only the webhook.

Is your Stripe webhook failing silently? Check it, alert on it, recover

A Stripe webhook can fail for days while payments still go through. Check endpoint status, list failed deliveries with delivery_success=false, and set up a daily alert.

Stripe webhook error: "Timestamp outside the tolerance zone"

Stripe rejects webhooks whose signed t= timestamp is more than 300 seconds old. Causes (clock drift, verifying late, replayed payloads), fixes, and why tolerance 0 disables the check.

Stripe webhook stopped working after a migration or domain change

Moved your app to a new host or domain and payments stopped unlocking? Stripe keeps sending to the old URL. How to repoint the endpoint, keep the right signing secret, and recover missed events.

Stripe webhook timed out (or returns 500): answer first, then do the work

Stripe shows (Timed out) ERR or a 500 and retries pile up? Your handler does too much before it answers. Record the event, return 2xx, and finish the work after the response without losing it.

Refunded, disputed or canceled, but the customer still has access

The customer got a refund, opened a chargeback or canceled, and still has full access. Your webhook only listens for the purchase. The events to add and how to map them back to the user.

How to test a Stripe webhook fix without waiting for a new payment

You changed the handler and now you are waiting for a real customer to find out if it works. Resend the event that failed, replay it locally, or trigger a fresh test event in minutes.

Your Stripe success page unlocks access. Anyone can open it.

If your app grants access when the buyer lands on /success, anyone who types that URL gets it free. Check the Checkout Session on your server, tie it to the user, and let the webhook do the unlocking.

Your checkout trusts the price the browser sends. Anyone can change it.

If your frontend sends the amount to your checkout endpoint, anyone can edit it and pay $1 for your $49 plan. Send a Price ID, look it up on the server, and check what was paid before you unlock.

The customer clicked Pay twice. Stripe charged them twice.

A buyer clicks Pay twice, or subscribes twice, and your server happily creates two payments. Use idempotency keys, reuse the open Checkout Session, limit subscriptions to one, and refund real duplicates.

Your Stripe webhook sets is_paid. Your users can set it too.

If your Stripe webhook writes is_paid or plan into a Supabase profiles table, an "update own profile" policy often lets any signed-in user flip it from the browser. Test it in one minute and move the paid flag out of reach.

Worked in sandbox, fails on real payments: the Supabase RLS error in your Stripe webhook

If your Stripe checkout unlocked fine in sandbox but real payments fail with "new row violates row-level security policy", permission denied, or an update that changes nothing, the webhook is writing to Supabase without a user session. Use the secret key on the server, and keep user tokens out of that client.

Missed a Stripe webhook? Reconcile paid customers against Stripe every day

One missed Stripe webhook and a paying customer stays on the free plan. Here is why events get missed, how long Stripe retries, and a daily job that lists completed Checkout Sessions, compares them with your orders and fixes the gaps.

Stripe order stuck on "pending"? Handle delayed payments (ACH, bank debits)

Checkout completed but the order stays pending forever, or the buyer got access before the money arrived? With ACH and other delayed payment methods, checkout.session.completed fires while payment_status is still unpaid. Handle async_payment_succeeded and async_payment_failed.

AI built your Stripe checkout? Run this webhook checklist before the first real charge

AI built your Stripe checkout and you are not sure the webhook is safe. Run these five checks before the first live payment: reject unsigned events, do not unlock from the success page, confirm the live endpoint and secret, and keep fulfillment idempotent.

Stripe webhook events arrived out of order? Don't depend on the sequence

Stripe does not guarantee webhook delivery order. invoice.paid can arrive before customer.subscription.created. Retrieve the invoice and subscription from the API instead of waiting for events in sequence.

Stripe renewal payment failed, but the customer still has access

A subscription renewal payment failed, yet the customer still has full access weeks later. Handle invoice.payment_failed, read past_due vs unpaid vs canceled, and make the end of retries actually change access.

Stripe Connect: account.updated never reaches your webhook

Your marketplace never hears that a seller finished Stripe onboarding. Connected-account events only reach an endpoint listening to Connected accounts. Set up both scopes, both secrets, and test it.

Stripe secret key exposed in your frontend or GitHub: what to do now

Your AI builder put sk_live_ in client code, a VITE_ or NEXT_PUBLIC_ variable, or a public repo. Rotate it, move it server-side, switch to a restricted key, and roll the webhook secret if it leaked too.

Stripe payment succeeded but the webhook can't find the user (metadata is empty)

The payment succeeded but metadata.user_id is empty in your webhook. Checkout Session metadata doesn't copy to the PaymentIntent or Subscription. Read it from checkout.session.completed or set payment_intent_data / subscription_data metadata.

Your Stripe webhook verifies the signature, then accepts the event anyway

Your Stripe webhook "verifies" signatures but still accepts forged events: the catch block logs the error and carries on, or verification is skipped when a header or secret is missing. How to spot it, fix it to fail closed, and test it with a bad signature.

Buyers pay, then land on your old domain: every URL to change after a migration

Moved to a new domain and buyers pay, then land on the old site, or sign-in breaks? Fix Checkout success_url and cancel_url, Payment Link redirects, the Customer Portal return URL, payment method domains, and the Supabase Auth Site URL and Redirect URLs.

Green webhook tests, broken production: test with signed events, not mocks

Your AI agent wrote green tests for the Stripe webhook, then production double-fulfills or returns 400 and 500. Sign test payloads for real, hit a real database, and run the Stripe CLI before you trust the suite.

Supabase service_role key in the browser? Rotate it and move the paid write to your webhook

AI builders sometimes put the Supabase service_role key in browser code so the "mark as paid" write works. That key bypasses RLS. Find it, move the write behind a verified Stripe webhook, and rotate the key.

Lemon Squeezy, Paddle and Polar

The same failures on merchant-of-record platforms, sourced from each provider's docs.

Lemon Squeezy webhook signature invalid? Fix X-Signature in 5 steps

Why Lemon Squeezy X-Signature checks fail (parsed bodies, escaped slashes, wrong secret or mode, non-200 replies) and the raw-body fix that works.

Paddle webhook signature verification failed? Check these 6 things

Fix Paddle-Signature mismatches: the ts:rawBody signed payload, per-destination secret keys, the five-second tolerance, and the 200-in-five-seconds rule.

Polar webhook signature failing? The 8 Sep 2026 secret rule, and other 403 causes

Polar now signs with two schemes depending on when your secret was created. Fix webhook-signature failures, 403s from Bot Fight Mode, redirects and disabled endpoints.