Skip to content
AI-powered appsNewChat, vision, voice, generationBookings & schedulingAppointments that book themselvesShops & sellingA storefront in every pocketClient & businessRun the operation from one placeCommunities & clubsA home that is not a group chat
Health & wellnessHabits, tracking and calmGames2D, 3D and multiplayerPersonal & toolsThe tool you wish existedInternal toolsThe tool ops never had time for
See all use cases
ArcadeNewPricingSecurity
EngineThe game engine and World EditorHow it worksFrom one sentence to a live productDocsGuides for building and publishingBlogStories, guides and newsChangelogWhat shipped latelyStatusUptime of every serviceSupportGet help from the team
AI-powered appsBookings & schedulingShops & sellingClient & businessCommunities & clubsHealth & wellnessGamesPersonal & toolsInternal tools
See all use cases
ArcadeNewPricingSecurity
EngineHow it worksDocsBlogChangelogStatusSupport
Language
Blog
TroubleshootingNovember 22, 20265 min read

Stripe webhook not firing

A webhook that "never fires" usually did fire. Stripe either sent it somewhere else, or your function rejected it. The delivery log in Stripe tells you which.

Startbase Team
Editorial ink illustration of a shop doorbell wired to a silent bell with a cut wire, the bell in ember orange

Key takeaways

  • Open the webhook endpoint in the Stripe Dashboard first. Each event delivery shows the status code your function returned.
  • Test mode and live mode have separate endpoints and separate signing secrets. A mismatch is the most common cause after going live.
  • A webhook function must accept requests without a user sign-in and must verify the signature against the raw request body.

When a customer pays, Stripe shows the payment as succeeded, and your app never marks the order paid, the webhook almost certainly did fire and was either sent to the wrong place or rejected by your function. The most likely cause is a mismatch between Stripe's test and live modes: the endpoint or its signing secret exists in one mode while payments happen in the other. Next come an endpoint URL that is wrong, a function that requires a signed-in user (Stripe never is), and signature verification that fails.

Start in the Stripe Dashboard

Stripe logs every attempt to deliver an event. Open your webhook endpoint in the Stripe Dashboard (under Developers, or Workbench in newer accounts) and look at recent deliveries. You will see one of these:

  • No endpoint listed at all, or no deliveries: the endpoint is not registered in this mode, or it is not subscribed to the event. Causes 1 and 2.
  • Deliveries with 401 or 403: your function requires sign-in. Cause 4.
  • Deliveries with 400: usually your signature check rejected the event. Cause 5.
  • 404: wrong URL. Cause 3.
  • 500 or timeouts: the function crashed or was too slow. Cause 6.
  • 200 OK, but the app still did not update: the handler ran and did the wrong thing. Cause 7.

From the same page you can resend a specific event once you have fixed things, which beats making new test payments over and over.

Where the webhook lives in a Startbase app

Payments in Startbase Cloud run on your own Stripe account. With the manual setup, you save `STRIPE_SECRET_KEY` in Secrets, ask the agent to scaffold checkout, then register a Stripe webhook and save its `STRIPE_WEBHOOK_SECRET`. The webhook handler is an edge function: server-side TypeScript that reads those secrets, which never reach the browser. If you used one-click Stripe Connect from the Payments section instead, ask the agent how your app confirms payments in that setup before adding a webhook of your own, so you do not end up with two handlers fighting over the same order.

The causes, most likely first

1. Test mode vs live mode

Stripe keeps test and live data completely separate: different API keys, different webhook endpoints, different signing secrets. Everything worked in test mode, you switched to live keys, and you never created the live endpoint, or you did but kept the test signing secret. How to check: toggle the Dashboard between test and live and look at the endpoints in each. The fix: create the endpoint in live mode with the same URL and events, and save the live endpoint's signing secret as `STRIPE_WEBHOOK_SECRET`. Saving a new value replaces the old one; secrets are write-only, so you cannot read back which one is stored, only replace it.

2. Not subscribed to the event

An endpoint only receives the event types you select. If your code waits for `checkout.session.completed` and the endpoint listens only for `payment_intent.succeeded`, nothing arrives. Subscriptions need more: `customer.subscription.updated`, `customer.subscription.deleted` and `invoice.payment_failed` at minimum. The fix: add the events your handler actually processes, and only those.

3. The endpoint URL is wrong

A typo, an old function name, or the URL of the app page instead of the function. How to check: in the Edge Functions section of the Backend tab, open the function's details; it has a Copy URL button for its endpoint. Compare it with the URL registered in Stripe. The fix: paste the copied URL into the Stripe endpoint.

4. The function requires sign-in

Edge functions can require a signed-in user or be public, and the function's details in the Edge Functions section show which. App functions usually require sign-in, which is right for them, but Stripe calls your webhook with no user session, so a sign-in requirement rejects every delivery with 401. The fix: make the webhook function public, and let the Stripe signature be its security: it proves the request came from Stripe.

5. Signature verification fails

Your function must verify the `Stripe-Signature` header using the signing secret and the exact raw body Stripe sent. Parsing the body as JSON first, then re-serializing it, changes the bytes and the check fails. In edge functions (which run on Deno), read the body with `await req.text()` and use Stripe's async verification (`constructEventAsync`). How to check: the function logs say "No signatures found matching the expected signature" or similar. The fix: raw body, async verification, and the right secret for the mode (cause 1). Also note the Stripe CLI's `stripe listen` prints its own temporary secret, different from the Dashboard endpoint's.

6. The function crashes or is slow

A missing secret, a database error or a slow outside call makes the function fail, and Stripe retries. In live mode Stripe keeps retrying with increasing gaps for up to three days, so a fixed function can still catch up. How to check: the Logs section, Functions source, around the delivery time, or the function's own recent logs. Each log row has Fix with AI. The fix: fix the error, then return 200 quickly. Do heavy work (emails, PDFs) after recording the event, not before responding.

7. It ran, but updated the wrong thing

The function received the event but could not tell which order or user it belonged to, so nothing changed. The fix: when creating the checkout session, attach your own identifiers (`client_reference_id` or `metadata` with your order ID and user ID), and look them up in the handler. Make the handler idempotent: Stripe can deliver the same event more than once, so record processed event IDs and skip duplicates, or you may send two receipts or grant credits twice.

Test the whole loop before customers do

  1. 01In test mode, pay with Stripe's test card `4242 4242 4242 4242`, any future date and any CVC.
  2. 02Watch the delivery appear in Stripe with a 200.
  3. 03Check the order row changed in the Data section.
  4. 04Resend the same event and confirm nothing happens twice.
  5. 05Repeat once in live mode with a small real payment, then refund it.

The message to send the agent

Live payments succeed in Stripe but orders stay "pending" in the app. The live webhook endpoint in Stripe shows deliveries of checkout.session.completed failing with 400. Test mode works. Please: check the stripe-webhook edge function logs for the last day, make sure the function is public and verifies the signature with await req.text() and constructEventAsync, confirm it reads STRIPE_WEBHOOK_SECRET (I will paste the live signing secret into Secrets myself), look up the order from client_reference_id, record processed event IDs so duplicates are ignored, and return 200 before sending the receipt email. Then tell me which events the endpoint should subscribe to.

For the bigger picture, read accept payments in your app and the glossary entry on webhooks. Setup paths are in the Payments docs.

Frequently asked questions

Why does my Stripe webhook return 400?

Usually the signature check fails: the wrong signing secret (test vs live, or the CLI secret), or the body was parsed before verification. Verify against the raw body with the endpoint's own secret.

Does Stripe retry failed webhooks?

Yes. In live mode Stripe retries with increasing delays for up to three days, and you can resend any event from the Dashboard.

Should my webhook function require login?

No. Stripe cannot sign in. Make the function public and rely on Stripe's signature to prove each request is genuine.

Why do I get the same webhook twice?

Stripe may deliver an event more than once, for example after a timeout. Store processed event IDs and skip repeats.

On this page

  • Start in the Stripe Dashboard
  • Where the webhook lives in a Startbase app
  • The causes, most likely first
  • Test the whole loop before customers do
  • The message to send the agent

Keep reading

More in Troubleshooting
Editorial ink illustration of an overstuffed card catalog drawer spilling index cards, the brass tab of one card in ember orange
TroubleshootingNovember 22, 2026

Why is my app slow with lots of data?

An app that slows down as data grows almost always loads or draws too much at once. Here is how to find which part is slow and the fix for each.

6 min read
Editorial ink illustration of a border checkpoint with a lowered barrier arm and a waiting parcel, the guard's stamp in ember orange
TroubleshootingNovember 22, 2026

CORS errors explained and fixed

A CORS error means the server you called did not say your website is allowed to read its answer. The fix lives on that server, or in a server function you control.

5 min read

Read less. Ship more.

Everything in this post is one prompt away. Describe your app and watch it build.

Start building

Apps, games, backends and publishing from one conversation.

Product

  • Features
  • Use cases
  • Pricing
  • Changelog

Resources

  • Blog
  • Docs
  • Support
  • Status
  • Security

Contact

  • w@startbase.ai
  • X / Twitter
  • LinkedIn
  • Instagram

Legal

  • Terms
  • Privacy

© 2026 Startbase. All rights reserved.