๐ณStripe Integration
Stripe Webhooks Guide
Receive and verify Stripe webhooks for payments, subscriptions, disputes, and more. Handle every Stripe event reliably.
โก Quick Start
- 1
Create a HookSniff endpoint
Sign up and create an endpoint that will receive Stripe webhooks.
- 2
Configure Stripe
In Stripe Dashboard โ Developers โ Webhooks โ Add endpoint. Paste your HookSniff URL.
- 3
Select events
Choose which events to receive: payment_intent.succeeded, customer.subscription.updated, etc.
- 4
Verify & process
Use the HookSniff SDK to verify Stripe signatures and process events in your application.
๐ Common Stripe Events
| Event | When It Fires |
|---|---|
| payment_intent.succeeded | Payment completed successfully |
| payment_intent.payment_failed | Payment attempt failed |
| customer.subscription.created | New subscription started |
| customer.subscription.updated | Subscription changed (plan, quantity) |
| customer.subscription.deleted | Subscription cancelled |
| invoice.paid | Invoice payment succeeded |
| invoice.payment_failed | Invoice payment failed |
| charge.refunded | Refund issued |
| charge.dispute.created | Customer initiated a dispute |
| checkout.session.completed | Stripe Checkout completed |
๐ป Node.js Example
import { Webhook } from 'hooksniff-sdk';
const webhook = new Webhook(process.env.HOOKSNIFF_SECRET);
app.post('/webhooks/stripe', (req, res) => {
const event = webhook.verify(req.body, req.headers);
switch (event.type) {
case 'payment_intent.succeeded':
// Handle successful payment
handlePayment(event.data.object);
break;
case 'customer.subscription.deleted':
// Handle subscription cancellation
handleCancellation(event.data.object);
break;
}
res.json({ received: true });
});Start receiving Stripe webhooks
HookSniff handles signature verification, retries, and delivery monitoring automatically.
Start for free โ