#TrashPanda-subscription

1 messages · Page 1 of 1 (latest)

acoustic warren
#

Hi! Give me a few minutes to look into this.

languid fern
#

Thank you!

acoustic warren
#

How do I know when subscription ends after invoice is paid?
What do you mean by "when subscription ends"?

languid fern
#

I mean the date where if you don't pay, your service should be cut off. From trial to active I would get subscriptino.update but what happens in following months, when invoice.paid is triggered?

#

Each time I get invoice.paid I'd like to change the service expiry date in my system to whenever the end of subscription is.

#

subscriptions have current_period_end which I assume is the date I want. but invoice does not have that date

acoustic warren
languid fern
#

So I have to retrieve subscription based on invoice.paid event data and get current_period_end right?

#

Is current_period_end the right thing to look at when it comes to subscription end?

acoustic warren
#

Yes, as the documentation for current_period_end states:

End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.

languid fern
#

Thank you very much. Is there no way to have stripe trigger subscription.update event? since subscription.current_period_end is changing, so update is happening. There is no way to receive this webhook event?

acoustic warren
#

If I understand correctly, you'd like to be notified when a new billing cycle starts?

languid fern