Keys / Stripe

STRIPE_WEBHOOK_SECRET

The signing secret your app checks Stripe webhook events with. Each endpoint has its own; stripe listen prints one for local testing.

Starts with
whsec_
Expires
never, until you roll it
API
create and delete endpoints; the secret comes back only on create

Get it

Create one on dashboard.stripe.com/webhooks. The steps aren't recorded yet.

Set it

STRIPE_WEBHOOK_SECRET=whsec_...

No official Stripe SDK reads it; your app passes it to the SDK's webhook check, as Stripe's Node.js examples do with STRIPE_WEBHOOK_SECRET. Or keep it out of .env with keypin: keypin run -- npm run dev

Replace it

  1. In the Webhooks tab, open the endpoint's menu and click Roll secret. Keep the old secret active for up to 7 days.
  2. Deploy the new secret everywhere that reads STRIPE_WEBHOOK_SECRET. Stripe signs each event with every active secret until then.
  3. Check that every server verifies events with the new secret before the old one expires.

Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.

Sources, checked 2026-11-16