#Suren

1 messages · Page 1 of 1 (latest)

vivid lilyBOT
slim fulcrum
ruby junco
#

when I try change subscription to cancel I received past_due status subscription is it correct ?

slim fulcrum
#

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?

ruby junco
#

"sub_1MJz5rBfTh1Z0SMkZqxozdcj"

#

this is subscription id

slim fulcrum
#

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

ruby junco
#

and how can I check past_due I received because subscription was cancel or payment was't be paid

slim fulcrum
#

You would use customer.subscription.updated

#

That will fire every time anything with the Subscription object changes, like the status

ruby junco
#

so how can I track the subscription payment status? for example subscription after current period end was't pay

slim fulcrum
#

You mean the payment for a specific Invoice?

#

I'm not sure exactly what you mean

ruby junco
#

Simply I don't know how to track subscription.update webhook and discern when subscription was canceled or unpaid

slim fulcrum
#

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

ruby junco
#

Yes but past_due was when I try cancel the subscription

slim fulcrum
#

Not sure what you mean by that?

#

You are going to explicitly cancel Subs as soon as they are past_due?

ruby junco
#

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

slim fulcrum
#

The Subscription isn't "active", though. It is "past_due".