#Suren
1 messages · Page 1 of 1 (latest)
Hello! Have you taken a look at https://stripe.com/docs/billing/subscriptions/webhooks already?
when I try change subscription to cancel I received past_due status subscription is it correct ?
No that shouldn't be the case
It should be in a status of canceled if you explicitly canceled it
Can you show me an example?
Okay so looks like you scheduled the Sub to cancel in a year
So that's why it is past_due
Since you used "cancel_at_period_end": "true"
That will wait until the end of the cycle before it will actually cancel
and how can I check past_due I received because subscription was cancel or payment was't be paid
You would use customer.subscription.updated
That will fire every time anything with the Subscription object changes, like the status
so how can I track the subscription payment status? for example subscription after current period end was't pay
Simply I don't know how to track subscription.update webhook and discern when subscription was canceled or unpaid
So when a Subscription is paid it will have status: active
If it moves to a status: past_due then that means the most recent payment failed.
If it moves to a status: canceled then it was canceled
Yes but past_due was when I try cancel the subscription
Not sure what you mean by that?
You are going to explicitly cancel Subs as soon as they are past_due?
I'd like to leave it like this! but look that event when I try cancel the subscription in webhook I received status past_due but actually subscription is active until the current period end
The Subscription isn't "active", though. It is "past_due".