docs/stripe/5_webhooks.md
Pay listens to Stripe's webhooks to keep the local payments data in sync.
For development, we use the Stripe CLI to forward webhooks to our local server. In production, webhooks are sent directly to our app's domain.
You can use the Stripe CLI to test and forward webhooks in development.
stripe login
stripe listen --forward-to localhost:3000/pay/webhooks/stripe
example.org with your domain)whsec_... value to wherever you have configured your keys for Stripe as instructed in Credentials section under Configurations doc.Pay requires the following webhooks to properly sync charges and subscriptions as they happen.
charge.succeeded
charge.refunded
charge.updated
payment_intent.succeeded
invoice.upcoming
invoice.payment_action_required
invoice.payment_failed
customer.subscription.created
customer.subscription.updated
customer.subscription.deleted
customer.subscription.trial_will_end
customer.updated
customer.deleted
payment_method.attached
payment_method.updated
payment_method.automatically_updated
payment_method.detached
account.updated
checkout.session.completed
checkout.session.async_payment_succeeded
See Metered Billing