Webhook Event Handling Defaults
Pack:
stripeParent skill: Stripe Webhook First Billing State Source:stripe/stripe-webhook-first-billing-state/references/webhook-event-handling-defaults.mdDefault responsibilities:
- verify signature
- parse event
- record receipt or dedupe key
- map event to the internal billing projection
- trigger access or follow-up work
Default event set for a normal SaaS subscription flow:
checkout.session.completedinvoice.paidinvoice.payment_failedcustomer.subscription.updatedcustomer.subscription.deleted
Use more events only when the product needs them.
State ownership rule:
- Stripe owns billing object truth
- your app owns the minimum projection needed for authorization and UI
Idempotency rule:
- request-side writes to Stripe should use idempotency keys when retries are possible
- webhook-side processing should be safe to run more than once
Local loop:
- run the app locally
- use Stripe CLI to forward events to the webhook endpoint
- trigger sandbox payments or subscription changes
- verify the internal projection updates exactly once