#DeputyCheese
1 messages · Page 1 of 1 (latest)
👋 Thanks for reaching out
According to the documentation, a few days prior to renewal, your site receives an invoice.upcoming event at the webhook endpoint. You can listen for this event
https://stripe.com/docs/billing/subscriptions/webhooks#active-subscriptions
The number of days is based on the number set for Upcoming renewal events in your Dashboard:
https://dashboard.stripe.com/settings/billing/automatic
Thank you
What I didn't understand: when exactly will the invoice.paid happen? Also some days before the renewal date? I'm asking myself when I should pause/cancel a subscription on our side if the payment somehow failed
Or should I always keep the subscription active on our side and just listen to invoice.finalization_failed to cancel/pause a subscription?
The docs mention that I should revoke access to my product if the subscription status is unpaid or canceled
But when should I check for this?
The invoice.paidevent is triggered when you the customer is charged
Refer to this section:
https://stripe.com/docs/billing/subscriptions/webhooks#active-subscriptions
Step 4) Your webhook endpoint updates the customer’s access expiration date in your database to the appropriate date in the future (plus a day or two for leeway).
Okay, but on which event? invoice.paid?
Yes exactly
Okay, and this event will be called some days before the subscription would end, right? So it couldn't happen that the users subscription ended before that?
I.e. a user has paid on October 27th, the next month he would (automatically) pay on November 25th or 26th?
Okay, and this event will be called some days before the subscription would end, right?
No the eventinvoice.paidwill come just after the user is being charged. However, the eventinvoice.upcomingwill be triggered few days before the renewal of the subscription
If I understood correctly, the invoice.upcoming event exists so I can make changes on the subscription before it renews and the customer pays again. What I am searching for is the event that is used to confirm the payment itself, so I know if I should pause/cancel the subscription or renew it on our side.
So that would be invoice.paid, right?
For example there's not something like customer.subscription.renewed?
Yes this one
You need to refer to this event in order to know if you should pause/cancel the subscription or renew it on your side.
Okay thanks. And invoice.finalization_failed, invoice.payment_failed and invoice.payment_action_required for failed renewals, right?
Yes