#CC-hh-canceled-subscription
1 messages · Page 1 of 1 (latest)
It depends on if you cancel it immediately or at billing cycle end. If it's fully cancelled, you cannot reactivate it. You have to start a new one. If it's set to cancel_at_period_end, then you can reactivate it like this: https://stripe.com/docs/billing/subscriptions/cancel#reactivating-canceled-subscriptions
It's been fully cancelled. How can we automatically create the new subscription when the payment goes through? Currently we have to do this manually and we'd like to fix this
How are you currently creating new subscriptions?
No
The old subscription is in the cancelled state, but when the user updates their CC info the invoice for the cancelled subscription gets paid.
See on line 4 of the events, the subscription gets cancelled
But when the user updates their CC info, the payment goes through
Can we make the subscription automatically get recreated on stripe when the payment goes through?
No, though it will likely depend on how Subscriptions are being created. Are you creating them via the dashboard? Stripe Checkout? Custom payment form?
We're creating the subscription via a custom payment form on the frontend which sends a post request to our server that talks to Stripe and creates the subscription
But the invoice gets updated through Origin https://js.stripe.com/ so it's probably bypassing our process of making the new subscriptions. Is that possibly an email that the user is getting to update their payment directly through stripe?
In that case, you would simply listen for invoice.payment.succeeded and perform a check on that customer's Subscription to see if status=canceled and then create the new subscription the same way you created the others (except with the existing Customer and Payment Method)
There are email notification for stuff like this: https://dashboard.stripe.com/settings/billing/automatic
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
simply listen for invoice.payment.succeeded
So, I'd need a webhook to our backend to listen for invoice.payment.succeeded?
Correct
Can we do some sort of automatic duplication of the old cancelled subscription on the stripe side and just listen for some sort of subscription creation event?
Hi 👋 @rapid wedge had to go so I'm stepping in. No we don't have a mechanism to duplicate the subscription. Your code would need to do this using the properties of the old, canceled subscription to create the new Subscription.