#TrashPanda-subscription
1 messages · Page 1 of 1 (latest)
Thank you!
Yes you should get a subscription.updated event, since the status of the subscription should change from trialing to active. https://stripe.com/docs/api/subscriptions/object#subscription_object-status
How do I know when subscription ends after invoice is paid?
What do you mean by "when subscription ends"?
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
Got it! Well from the invoice object you can find the corresponding subscription ID: https://stripe.com/docs/api/invoices/object#invoice_object-subscription
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?
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.
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?
If I understand correctly, you'd like to be notified when a new billing cycle starts?
I want to be notified every time when current_period_end changes: https://stripe.com/docs/api/subscriptions/object#subscription_object-current_period_end