Stripe webhooks

Subscribe to the events your code acts on, and nothing else

Stripe documents nearly 250 snapshot event types and you need about a dozen. Tick them all and your endpoint spends the first of every month processing noise; tick too few and you find out about a dispute from your bank statement. This is the short list for each kind of integration, checked against Stripe's docs, with chapter 9's starter set and chapter 38's case for normalising events across providers.

The right set depends on how you take money. Pick the row that matches your integration, add the risk events every integration needs, and leave the rest unticked. Stripe's advice is the same: listening for extra events, or all of them, "puts undue strain on your server" (Stripe).

Descriptions below are from Stripe's event types reference and the integration guides linked in each section, checked November 2026. The "act on it" column is ours.

One-off payments with Checkout or Payment Links

EventWhen it firesAct on it
checkout.session.completedThe customer finished CheckoutFulfill if payment_status isn't unpaid
checkout.session.async_payment_succeededA delayed method (ACH, other bank debits) finally succeededFulfill now
checkout.session.async_payment_failedThat delayed payment failedTell the customer; don't ship
checkout.session.expiredThe session expired unpaidRelease held stock, send a recovery email if you do that

Stripe's fulfillment guide calls webhooks required, not optional, because "it's not guaranteed customers visit" your success page. Your fulfill function will be called more than once, "possibly concurrently", for the same session, so it has to be safe to run twice (Stripe). If you have a webhook endpoint listening for checkout.session.completed and a success_url, Checkout waits up to 10 seconds for your server to answer before redirecting the customer, which is one more reason to return 200 fast.

Payment Element and the PaymentIntents API

EventWhen it firesAct on it
payment_intent.succeededThe payment completedFulfill
payment_intent.processingA delayed method has started processingShow "pending"; wait
payment_intent.payment_failedA payment attempt failedAsk for another payment method; the intent is reusable
payment_intent.amount_capturable_updatedFunds are authorized and ready to capture (manual capture only)Capture before the authorization expires
payment_intent.canceledThe intent was canceledRelease the order
payment_intent.requires_actionThe customer has to authenticateUsually nothing; Stripe.js handles it while they're on the page

Stripe's guidance is to fulfill from payment_intent.succeeded, not from the client, "because customers can leave the page after payment is complete but before the fulfillment process initiates" (Stripe). Saving cards without charging? Add setup_intent.succeeded and setup_intent.setup_failed. The full state machine behind these is in Stripe PaymentIntents explained.

Subscriptions with Stripe Billing

EventWhen it firesAct on it
invoice.paidAn invoice payment succeeded, or it was marked paid out of bandRetrieve the subscription; extend access if it's active
invoice.payment_failedA payment attempt failedEmail the customer; let Smart Retries work
invoice.payment_action_requiredThe renewal needs the customer to authenticateSend them back to finish it
customer.subscription.createdA subscription was created; may be incompleteRecord it; don't grant access yet
customer.subscription.updatedPlan change, renewal, coupon, status changeSync plan and status
customer.subscription.deletedThe subscription endedRevoke access
customer.subscription.trial_will_end3 days before a trial endsCheck there's a payment method on file
invoice.createdA renewal invoice was createdReturn 2xx promptly, even if you do nothing
invoice.finalization_failedThe invoice couldn't be finalizedFix it, or you can't collect

Two traps live in that table. invoice.paid covers out-of-band payments where invoice.payment_succeeded doesn't, so it's the safer provisioning trigger. And invoice.created is load-bearing even if you ignore it: if Stripe doesn't get a successful response, it delays finalizing automatically collected invoices for up to 72 hours, so a broken endpoint quietly postpones your renewals (Stripe). The Stripe subscriptions guide covers the billing side.

Connect platforms

Events from your connected accounts carry a top-level account field naming the account, and you need a destination scoped to Connected accounts to receive them (Stripe).

EventWhen it firesAct on it
account.updatedRequirements or status changedChase missing onboarding details before payouts stop
account.application.deauthorizedA connected account disconnected (accounts with Dashboard access, like Standard)Clean up on your side
account.external_account.updatedA payout bank account or debit card changedCheck payouts still work
payout.failedA payout failed; the external account is disabled until updatedAsk the seller for new bank details
person.updatedA person on the account changed (if you use the Persons API)Re-check verification requirements

Where a payment event lands depends on the charge type. Direct charges belong to the connected account, so their events arrive at the Connected accounts destination. Destination charges and separate charges and transfers live on your platform account, so their events arrive at your own (Stripe). Get that wrong and your fulfillment code never hears about half the payments.

Every integration: disputes, refunds and fraud warnings

EventAct on it
charge.dispute.createdStart the evidence clock; it's short
charge.dispute.closedRecord the outcome: won, lost or warning closed
charge.refundedSync the refund, including partial ones; revoke access if it's a subscription
radar.early_fraud_warning.createdConsider refunding before it becomes a chargeback

Stripe's subscription guide puts it plainly: leave out the risk events and "your application won't learn about disputes or fraud warnings until you check the Dashboard" (Stripe).

Whatever you subscribe to, the handler rules don't change: verify the signature, dedupe on event.id, return 200 fast. Stripe webhooks: setup and signature checks has the code.

The six events chapter 9 starts every Stripe integration with. For new subscription code, prefer invoice.paid over invoice.payment_succeeded, for the out-of-band reason above.

Essential Webhook Events

EventPurpose
payment_intent.succeededPayment completed - fulfill order
payment_intent.payment_failedPayment failed - notify customer
invoice.paidSubscription invoice paid - extend access once the subscription is active
invoice.payment_failedSubscription payment failed
customer.subscription.deletedSubscription canceled
charge.dispute.createdChargeback initiated

Once you take more than one provider, event names stop matching. Chapter 38 normalises them into one vocabulary so each handler is written once.

A unified webhook system puts every provider's signature scheme in one router: Stripe's HMAC-SHA256 with a signed timestamp, PayPal's certificate-based signature, and HMAC-SHA256 for both Square and Adyen (provider docs). Stripe's libraries reject a timestamp more than 5 minutes old by default, which is your replay protection (Stripe docs). You build the router once; after that, a new provider's webhooks are a verifier class and a config entry.

Event normalization translates Stripe payment_intent.succeeded, PayPal PAYMENT.SALE.COMPLETED, and Square payment.updated into a single payment.succeeded event, so each handler is written once instead of once per provider. Square sends payment.updated for every status change, so its mapper has to check the status before calling anything a success. You still get the original payload for specialized cases, and wildcard handlers like payment.* or subscription.* cover a whole event category at once. Async handler execution keeps slow database writes and email sends from blocking the webhook response, which matters because Stripe expects a 2xx before any complex logic and treats a timeout as a failed delivery (Stripe docs). Failed handlers go to a retry queue, which preserves at-least-once delivery, and independent handlers can run in parallel.

Testing gets a lot easier. Mock webhook payloads with valid signatures run in unit tests without sandbox accounts. Event replay lets you debug handler logic against real production events. Deterministic ordering makes state-machine tests reliable. On the operations side, you get centralized webhook logs across all providers, retry logic for failed deliveries, alerting when error rates climb past a threshold you set, and endpoint monitoring for delivery success, latency, and errors.

Questions

Which Stripe webhook events should I listen to?

Only the ones your integration acts on. For Checkout: checkout.session.completed plus the two async_payment events. For PaymentIntents: payment_intent.succeeded and payment_intent.payment_failed. For subscriptions: invoice.paid, invoice.payment_failed and the customer.subscription events. Every integration should add charge.dispute.created, charge.refunded and radar.early_fraud_warning.created.

Should I use invoice.paid or invoice.payment_succeeded?

invoice.paid for provisioning. It fires when an invoice payment attempt succeeds or when an invoice is marked as paid out of band, while invoice.payment_succeeded only covers a successful payment attempt.

Should I subscribe to all Stripe events?

No. Stripe recommends receiving only the event types your integration requires, because listening to all events puts undue strain on your server.

Which webhook event should I use to fulfill a Stripe Checkout order?

checkout.session.completed, checking that payment_status isn't unpaid, plus checkout.session.async_payment_succeeded for delayed payment methods such as bank debits. Make the fulfill function safe to run more than once for the same session.

What happens if my endpoint doesn't respond to invoice.created?

Stripe delays finalizing invoices with automatic collection for up to 72 hours, so renewals are postponed until your endpoint returns a successful response.

What the book adds

What chapters 9 and 39 add

  • The webhook handler that claims each event once
  • Fetch-current-state handling for subscription events
  • Test clocks that fire a month of webhooks in a minute
  • Retry classification and the dead-letter path
  • Monitoring that catches silent delivery failures

30-day money-back · Instant PDF and EPUB

All 42 chapters