What is a Stripe webhook?
A Stripe webhook is an HTTP notification Stripe sends to your backend when payments, subscriptions, invoices, refunds, and customer events happen.
A Stripe webhook is a server-to-server event notification. For revenue attribution, webhooks are the reliable way to receive payment, subscription, renewal, refund, and churn events after checkout.
- Understand what Stripe webhooks do
- Know which webhook events matter for SaaS revenue
- Learn why webhooks are safer than success pages
- Connect webhook events to attribution metadata
A Stripe webhook is an HTTP request Stripe sends to your backend when something happens in Stripe.
For example, Stripe can send a webhook when a Checkout Session completes, an invoice is paid, a subscription changes, or a charge is refunded.
Webhooks let your backend react to payments without relying on the customer's browser.
Why webhooks matter
A checkout success page is not a reliable source of truth. The customer can close the tab, lose connection, block scripts, or never return from the payment page.
Stripe webhooks are server-to-server notifications. They are designed for backend workflows such as:
- Marking an account as paid.
- Recording a subscription start.
- Processing renewals.
- Recording refunds.
- Updating subscription status.
- Syncing revenue into analytics.
For attribution, the webhook is where payment data becomes reportable revenue.
Common Stripe webhook events
SaaS teams usually start with:
checkout.session.completedfor completed Checkout Sessions.invoice.paidfor subscription invoices and renewals.customer.subscription.updatedfor plan changes and status changes.customer.subscription.deletedfor cancellations.charge.refundedfor refunds.
You do not need to process every Stripe event on day one. Start with the events that change revenue or subscription state.
Webhooks and attribution metadata
Stripe knows the payment object, customer, invoice, subscription, amount, currency, and status. It does not automatically know the visitor source, campaign, landing page, or session that led to checkout.
That bridge has to be created before checkout. Your app should read the attribution context from the browser, send it to your backend, and copy stable identifiers into Stripe metadata.
When the webhook arrives, your backend can extract that metadata and connect the payment event to the earlier visit.
Security basics
Webhook endpoints should verify Stripe signatures. They should also process events idempotently because webhook delivery can be retried.
Idempotency means that if the same Stripe event arrives twice, your system records it once.
Do not trust arbitrary client-side payment messages as revenue. Treat Stripe webhooks as the authoritative payment lifecycle feed.
Next steps
Read Stripe webhook revenue events for the implementation workflow. If you are using Checkout, start with how to pass attribution to Stripe Checkout.
FAQ
Is a Stripe webhook required for revenue attribution?
For reliable Stripe revenue attribution, yes. Checkout success pages can be missed, but webhooks are designed to notify your backend when payment lifecycle events happen.
Which Stripe webhook event should I start with?
For simple Checkout flows, start with checkout.session.completed. For subscriptions, also process invoice.paid, customer.subscription.updated, customer.subscription.deleted, and charge.refunded.
Can a webhook be delivered more than once?
Yes. Webhook processors should be idempotent so a retried event does not create duplicate revenue.
Where does attribution metadata come from?
Your app should copy attribution identifiers into Checkout Session metadata and subscription metadata before Stripe sends webhook events.
Connect payments to the dashboard
Install the tracker, pass attribution into checkout, and report revenue by source, campaign, landing page, and path.
Related guides
Stripe revenue attribution for SaaS
Connect Stripe Checkout, subscriptions, invoices, refunds, and webhooks to source, campaign, landing page, and session reports.
What is checkout attribution?
Checkout attribution connects the visit, campaign, landing page, and session before checkout to the payment event that happens after checkout.
Connect Stripe to AttribIQ
Configure Stripe to send payment events to AttribIQ after your app has copied visitor and session identifiers into Stripe metadata.
Stripe webhook revenue events
Send Stripe webhook events to AttribIQ and understand how Stripe objects become attributed revenue events.