#jsdev

1 messages · Page 1 of 1 (latest)

round krakenBOT
dapper perch
#

Hi
You can track active subscriptions using webhook, if you receive invoice.payment_failure then you revoke access to the plan, and you don't give access to the new plan unless you get invoice.paid

eternal arrow
#

how I can revoke access to the previous plan ..?

dapper perch
#

When the Payment fails, you'll receive invoice.payment_failure so you revoke all access/plan of that customer.

eternal arrow
#

please share steps to revoke plan

#

in terms of api

dapper perch
#

For Stripe point of view there is only Subscription, we don't track plans/prices status.

#

You can track plan access in your own integration.

#

Once you get from Stripe invoice.payment_failure event for a Subscription, you can revoke access to all plans for your customer in your integration.

eternal arrow
#

but on payment fail my previous subscription got canceled at stripe end , how to get that again ..?

dapper perch
#

The Subscription isn't canceled directly after a failure payment, unless you configured this explicitly.

#

Referring to your first message:

it will autopay , now I am going to upgrade a stripe subscription and suppose payment fails , stripe will cancel my previous plan and since payment not complete
If the Subscription is canceled then you need to create a new Subscription for the Customer.

eternal arrow
#

I have upgrade immediately "billing_cycle_anchor ":"now" will this cancel my previous plan ..??

dapper perch
#

Plans and prices don't have lifecycle. The Subscription has a lifecycle.

#

The subscription can be canceled or active.

eternal arrow
#

as I have upgrade , so here it show past due

Is that mean , I have currently previous plan active and stripe will retry payment , if successfully in further call , it will switch to new plan , till then we are on previous plan ....?

#

please correct me if I m wrong ..

dapper perch
#

Is that mean , I have currently previous plan active and stripe will retry payment , if successfully in further call , it will switch to new plan , till then we are on previous plan ....?
No there is no track for previous or new plan, just the Subscription has status