Examples / Payments and billing / Stripe
Stripe webhooks
Payments, subscriptions, invoices, disputes and payouts, as one event type per change.
Events
- payment_intent.succeeded
- invoice.paid
- customer.subscription.updated
- charge.dispute.created
Signature
Header Stripe-Signature with t=<timestamp>,v1=<hex>. HMAC-SHA256 of '<t>.<raw body>' with the endpoint secret (whsec_…). Reject timestamps older than 5 minutes.
✓ A bin checks Stripe signatures: add the endpoint secret, whsec_… under Signature verification (Stripe).
Check a Stripe signature with the free tool.
Retries
Live mode retries with exponential backoff for up to 3 days. Test mode retries 3 times over a few hours.
See a retry schedule in the calculator.
{
"id": "evt_3Q9kLm2eZvKYlo2C1aBcDeFg",
"object": "event",
"type": "payment_intent.succeeded",
"created": 1759924800,
"livemode": false,
"data": {
"object": {
"id": "pi_3Q9kLm2eZvKYlo2C1XyZ",
"object": "payment_intent",
"amount_received": 149900,
"currency": "inr",
"customer": "cus_Qx7mN8pLk2RsTu",
"metadata": { "order_id": "ORD-20481" }
}
}
}
- Use event.id as the idempotency key. Stripe can send an event more than once.
- Fetch the object again from the API if you need the newest state.
Receive Stripe webhooks with webhooks.xyz
Create a bin. Paste its URL into Stripe. Each request shows at once with its headers and body. Add your secret, and each request gets a verified or failed mark. Add your server as a destination, and deliveries retry when it is down. Request an invite.
More in payments and billing: GoCardless, Paddle, PayPal, Razorpay, Square.