Stripe webhooks let Stripe push events to ActiveManage in real time — “payment succeeded”, “subscription cancelled”, “dispute opened”, “invoice paid”. Reacting to these is how you keep your data in sync with Stripe's authoritative source of truth.
Critical Events to Handle
- payment_intent.succeeded — confirm the charge in your order/ticket record.
- payment_intent.payment_failed — mark the order/subscription as overdue, optionally email the customer.
- customer.subscription.updated — sync subscription status, plan, quantity.
- customer.subscription.deleted — mark the user's subscription cancelled.
- invoice.paid — log the invoice for accounting.
- charge.refunded — reflect the refund in your records.
- charge.dispute.created — flag for manual review.
How ActiveManage Receives Them
The endpoint /api/stripe/webhook accepts POSTs from Stripe. Every request is verified against the webhook signing secret to prevent spoofing. Valid events are dispatched to handlers that update database records.
Replay and Investigation
Every received event is logged. If your handler had a bug or your DB was unreachable, you can mark events for replay from the Stripe dashboard — and ActiveManage will reprocess them with the (now-fixed) handler.
Worked Examples
- Subscription churn: Listen to
customer.subscription.deleted— trigger a “sorry to see you go” email plus an internal alert for accounts above a revenue threshold. - Failed renewal: Listen to
invoice.payment_failed— start a dunning sequence (3 retry emails over 7 days), then suspend service if still unpaid. - Dispute alert: Listen to
charge.dispute.created— page the finance team and freeze the related order. - Refund: Listen to
charge.refunded— release any reserved stock/booking and notify the user.
Note: Webhook events arrive out of order. Always check the event timestamp and ignore older events that would clobber newer state.