Test a Stripe webhook locally
Integrating Stripe webhooks often forces you to trigger real test payments just to check your handler. With Webhook Toolkit, generate a valid, signed Stripe event in one click, edit the payload, and send it straight to your local endpoint. Your Stripe-Signature verification is tested instantly.
Verify the signature server-side
On the Node.js side, your handler should validate the header before processing the event:
const sig = req.headers['stripe-signature'];
const event = stripe.webhooks.constructEvent(
rawBody, sig, process.env.STRIPE_WEBHOOK_SECRET
);
if (event.type === 'payment_intent.succeeded') {
// ...
}Remember to pass the raw body (unparsed) to constructEvent, otherwise the signature will never match. To receive a real event from Stripe on your localhost, create a Relay tunnel.
Frequently asked questions
How do I test a Stripe webhook locally without a real payment?
Use the generator above: pick the event (e.g. payment_intent.succeeded), paste your signing secret whsec_…, enter the URL of your local handler (via the Relay or a Receiver endpoint), then click Sign & send. The Stripe-Signature header is computed exactly the way Stripe does it.
Is the generated Stripe-Signature header valid?
Yes. It follows the official scheme t=timestamp,v1=HMAC_SHA256(timestamp.payload, secret). stripe.webhooks.constructEvent() will validate it without error as long as you use the right signing secret.
Can I change the amount or the customer?
Yes, the payload is fully editable before sending. Change the amount, the customer ID, the status… then resend as many times as you need.
How is this different from the Stripe CLI?
The Stripe CLI only works for Stripe and requires an install. Webhook Toolkit also handles GitHub, Slack, Twilio, Mailgun and Shopify, runs in the browser, and captures/inspects incoming requests.