#jsdev
1 messages · Page 1 of 1 (latest)
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
You can find more details about tracking invoices here:
https://stripe.com/docs/billing/subscriptions/webhooks#active-subscriptions
how I can revoke access to the previous plan ..?
When the Payment fails, you'll receive invoice.payment_failure so you revoke all access/plan of that customer.
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.
but on payment fail my previous subscription got canceled at stripe end , how to get that again ..?
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.
I have upgrade immediately "billing_cycle_anchor ":"now" will this cancel my previous plan ..??
Plans and prices don't have lifecycle. The Subscription has a lifecycle.
The subscription can be canceled or active.
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 ..
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