Stripe Webhooks
How to Test Stripe Webhooks Locally (2026)
Stripe uses webhooks to notify your application about payment events like successful charges, subscription updates, and disputes. Stripe signs every webhook with HMAC-SHA256 using your endpoint's signing secret.
With HookSense, point Stripe at a callback endpoint and let an AI agent await the result over MCP: create_callback_endpoint → wait_for_callback → verify_signature. Run npx @hooksense/mcp in Claude Desktop, Cursor, or any MCP client. No polling.
Signature Header
Stripe-Signature
Algorithm
HMAC-SHA256
Setup Guide
- 1Create a free HookSense endpoint at hooksense.com
- 2Copy your unique webhook URL (e.g. https://hook.hooksense.com/w/abc123)
- 3In Stripe Dashboard → Developers → Webhooks → Add endpoint
- 4Paste your HookSense URL and select the events you want to receive
- 5Copy the signing secret (whsec_...) and add it to HookSense for automatic HMAC verification
- 6Trigger a test event from Stripe Dashboard or make a test payment
- 7Watch the webhook appear in HookSense in real-time
Common Stripe Webhook Events
checkout.session.completedinvoice.paidinvoice.payment_failedcustomer.subscription.createdcustomer.subscription.updatedcustomer.subscription.deletedpayment_intent.succeededcharge.dispute.createdForward to Localhost
Use HookSense CLI to forward Stripe webhooks directly to your local development server:
npx hooksense listen -p 3000 --path /api/integrations/stripeNo ngrok or tunnel setup required. Install with npm i -g hooksense or use npx.
Tips & Best Practices
- Always verify the Stripe-Signature header before processing webhooks in production
- Use Stripe CLI (stripe trigger) to send test events during development
- HookSense can forward Stripe webhooks to your local server — no ngrok needed
- Set up custom responses in HookSense to test how your app handles different status codes
Related
Give your agent a Stripe callback
Create a free callback endpoint and have an agent await its first verified Stripe webhook over MCP. Paid plans are early-access.
Get Started Free