Test Stripe webhooks locally

Stripe webhook development usually needs two phases: inspect what Stripe sends, then handle it in your local app. Mercur covers both — start with the online tester, then unlock Local Tunnels when you are ready to forward.

Stripe CLI vs a public URL

The Stripe CLI can forward events to localhost from your machine. A public HTTPS URL is useful when:

  • You want to configure a real endpoint in the Stripe Dashboard
  • A teammate needs to hit the same receiver
  • You are debugging signature headers and body encoding as Stripe delivered them

You can use either approach. This guide uses a public Mercur URL.

1. Open the webhook tester

Open the webhook tester

Copy the temporary public HTTPS URL. No account is required to inspect deliveries.

2. Add an endpoint in Stripe

In the Stripe Dashboard, open Developers → Webhooks → Add endpoint. Paste your Mercur URL as the endpoint URL and select the events you care about (for example checkout.session.completed or payment_intent.succeeded).

Save the endpoint. Stripe will often send a test event immediately.

3. Inspect the event in Mercur

Return to the webhook tester. Open request history and select the delivery:

  • Confirm the path Stripe called
  • Read JSON body fields such as id, type, and data.object
  • Note the Stripe-Signature header for local verification later

Guest mode responds 204 No Content and does not run your application code — that is intentional while you are only inspecting.

4. Forward to your local app

When your handler is ready:

  1. Create a free Mercur account
  2. Start a Local Tunnel aimed at your local port (for example http://127.0.0.1:3000)
  3. Update the Stripe endpoint URL to the new tunnel URL, or create a second endpoint for local work
  4. Use Record Session in the console when you want a live capture of tunnel traffic

Signature verification still uses the endpoint’s signing secret from the Stripe Dashboard — keep that secret in your local env, not in Mercur.

Related

Inspect a Stripe delivery now