I'm working on an app have a monthly subscription plan form Stripe. I'm creating a customer then subscription for users to subscribe which is working fine for me but I have not figure out how to create cancelation flow with Stripe subscription.
I used a cancel subscription button with stripe.subscriptions.del
and it gives me a problem in a situation when that user wants to reactivate subscription. What is the best practice to make cancel subscription flow?
- user clicks cancel subscription button
- execute
stripe.subscriptions.del
to cancel current subscription but keep the user's customer ID - when user reactivate the subscription, create a new subscription to the existing customer ID with
stripe.subscriptions.create
Does it make sense? or there's better ways to implement this?