#DeputyCheese

1 messages · Page 1 of 1 (latest)

crude elkBOT
languid basalt
foggy tangle
#

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?

languid basalt
languid basalt
#

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).

foggy tangle
languid basalt
#

Yes exactly

foggy tangle
#

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?

languid basalt
#

Okay, and this event will be called some days before the subscription would end, right?
No the event invoice.paid will come just after the user is being charged. However, the event invoice.upcoming will be triggered few days before the renewal of the subscription

foggy tangle
#

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?

languid basalt
#

You need to refer to this event in order to know if you should pause/cancel the subscription or renew it on your side.

foggy tangle
#

Okay thanks. And invoice.finalization_failed, invoice.payment_failed and invoice.payment_action_required for failed renewals, right?

languid basalt
#

Yes