Resources / Guides

Where to find your Stripe webhook signing secret (whsec_)

Find the whsec_ signing secret for a Stripe webhook in Workbench, the Stripe CLI or the API — and fix the "No signatures found" error caused by the wrong one.

Every Stripe webhook endpoint has its own signing secret, a string that starts with whsec_. Your code uses it to check the Stripe-Signature header on each event. It is not your API key (sk_…), and there isn't one secret per account: there is one per endpoint, plus a separate one for the Stripe CLI.

In the Stripe Dashboard (Workbench)

  1. Open the Webhooks tab in Workbench (dashboard.stripe.com/webhooks).
  2. Select the event destination that points at your URL. If there isn't one yet, create it first.
  3. On the destination's page, find Signing secret and click Reveal.
  4. Copy the whsec_… value into your environment as STRIPE_WEBHOOK_SECRET.

Workbench replaces the older Developers Dashboard; endpoints created there show up in the same Webhooks tab.

When testing locally with the Stripe CLI

stripe listen --forward-to localhost:3000/webhook prints a signing secret when it starts:

Ready! Your webhook signing secret is whsec_… (^C to quit)

Events forwarded by the CLI are signed with that secret, not the one from the Dashboard. Use it only while the CLI is forwarding.

From the API

If you create endpoints in code, ask Stripe to include the secret in the response when you create the event destination (the webhook_endpoint.signing_secret field). Store it right away; treat it like any other credential.

Test mode, live mode and multiple endpoints

"No signatures found matching the expected signature"

The wrong secret is the most common cause. Check, in order:

  1. The secret belongs to the endpoint that actually sent the event (Dashboard vs CLI, test vs live).
  2. It has no stray spaces or newlines from copy-paste.
  3. You verify against the raw request body, not re-serialised JSON.

The full verification code for Node.js and Python is in how to verify Stripe webhook signatures.

Keep it out of your code

Don't commit whsec_… to a repository. Read it from an environment variable or secret store at runtime, and roll it from the endpoint's page if it ever leaks.

On Wisp

Describe the webhook — "receive Stripe checkout events and email the customer" — and Wisp writes an endpoint that verifies the signature on the raw body, asks for STRIPE_WEBHOOK_SECRET through a private form (it never enters the chat), and gives you the URL to paste into Workbench.

Try it: Template: Stripe webhook to Slack · Template: Stripe Checkout endpoint

Build it with Wisp — describe an API, get it live.

Related