Dudu Dudu
Dudu Dudu

Reputation: 181

Stripe checkout: handling subscription payment failure

Say an user's monthly subscription is renewed, at which point the 'customer.subscription_updated' event fires off. As it is, I extend the user's subscription by one month. Though, if the event 'invoice.payment_failed' comes after a few days, I update a boolean in the database named 'subscriptionNotPaid' to true and the subscription's benefits are disabled in the app. After that, how should I activate it again? What event should dictate that it is now safe to re-enable the subscription's benefits in the app?

Thanks in advance for any help.

Upvotes: 0

Views: 114

Answers (1)

karllekko
karllekko

Reputation: 7258

You'd react to the invoice.paid event to reactivate the subscription.

https://docs.stripe.com/billing/subscriptions/webhooks#active-subscriptions

Upvotes: 1

Related Questions