#sadeed
1 messages · Page 1 of 1 (latest)
the money they have paid
what does "store" mean?
not really understanding you. Cancelling an ongoing subscription doesn't take any money from you(the merchant), you have all the money from all previous payments and its paid out to your bank account as normal.
sorry for the confusion, for example a customer is subscribed to x product and they want to upgrade to y.
As I have it setup right now, the subscription object is created automatically when a checkout session is created using stripe.Session.create. So whenever a checkout session is created a new subscription is made.
To counter this I store the subscription id inside my application's db and check if a subscription id exists previously. This way i can cancel that subscription when a customer is trying to upgrade and let the session create a new subscription.
But this approach means whenever a subscription is cancelled a new subscription starts not allowing for the previous subscription to complete its tenure.
So I want a way to cancel the previous subscription immediately and if it has remaining days carry that cash over to the other subscription
basically giving them a discount
👋 taking over for my colleague. Let me catch up.
sorry for the delay
have you considered the Customer Billing Portal to handle the upgrade? https://stripe.com/docs/billing/subscriptions/integrating-customer-portal
Hi, sorry for the late reply
The customer Portal is great but unfortunately I can not use it unless it is the only way since that would go against our requirements.
Appreciate the help btw
So I want a way to cancel the previous subscription immediately and if it has remaining days carry that cash over to the other subscription
Sure, that should be possible with prorations: https://stripe.com/docs/billing/subscriptions/cancel
The customer would be credited with the amount for the unused time, and then any subsequent subscriptions for that same customer the credit balance would be applied to the invoices