#darthvader-subs-upgrades
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- darth-subscription-upgrade, 1 day ago, 42 messages
Hello
Hi
You are creating the Subscription with collection_method: send_invoice?
So let me explain the full functionallity we wanna have so we are on the same page, makes sense?
Really an example Subscription would be helpful. But sure feel free to provide details as well.
We're introducing a new Stripe Plan with a zero-cost option, enabling customers to choose between the paid and free tiers. If a customer currently subscribes to the $10 plan and decides to switch to the free plan, we want to cancel the existing subscription at the end of the billing cycle. Upon receiving the Stripe webhook notification indicating the billing cycle's completion, we'll seamlessly transition the customer from the paid plan to the free plan. This approach ensures that customers can enjoy the paid features for the remaining duration of their paid subscription and then seamlessly transition to the free plan without any interruption.
Let me know if makes sense and also if is possbile what we wanna do 🙂
Why not just downgrade from the paid to free if they want to switch?
Downgrading would not mean to right away update the current subscription to the FREE plan?
I see, so we can schedule the subscription downgrade when the user current subscription will end and move the customer to a new subscription when this happens
Yah, this could be also a way to approach this
The idea I had would not work?
or it's not ideal?
Your way does work but I'm not sure why you woul want to deal with two different Subscriptions instead of just one.
I would not have 2 subscription at the same time]
I'm suggesting that when the user downgrades you attach a Subscription Schedule to the Subscription that tells the Subscription to downgrade to your free Price at the end of the current period
yah
makes sense ok
but here I have a question
how can we stop sending invoices for this users, witch are on this FREE plan? Since they don't have to buy anything we would like to not bother them with this kind of emails
is this something that we can do?
There won't be any email sent for a $0 Invoice
So ur saying if I'm on a plan with price zero for several months I would not receive any email becauase of the price not beeing grater than zero?
Yeah there is no receipt sent for a $0 Invoice
oh, ok
because I thought I have to do something for this to not be "on"
in the past I had another project witch had FREE subscription and maybe I'm getting old but I thoght Stripe was sending invoices for the zero amount
maybe they changed this in the last idk, year?
Hmm no it shouldn't have changed.
However it has to do with the collection_method of the Subscription
I assume you use charge_automatically though
oh, so maybe in the other project when I was changing the subscription from idk $6 to $0 i did not changed the collection_method from the default value witch is charge_automatically to send_invoice this might be the cause?
ok, so I have to try it and see
We don't send receipt emails in test mode but yeah no receipt will be sent for a $0 Invoice if using charge_automatically
Correct
Ok, perfect
Thanks, will start than getting the functionality up and running and if something will come back with a real example
Sounds good
Thanks man
No problem
One quick question
are you still here?
If I use the schedule method to change from paid to free how would i know in terms of letting the user know his subscription will be changed to free when the time comes? updating the subscription cancel_at_period_end to true would not help?
There will be a customer.subscription.updated Event that fires whenever the Subcription updates
You can rely on that to send an email or something to your customer if you so desire
ok, but what i mean I say today i wanna go to a free plan and in 15 days my subscription ends ... how I would know this event will take plans in 15 days to show this to the user?
I mean doing this and only depend on the stripe API, not on a db entity witch can hold this information
Oh if you are setting cancel_at_period_end then the cancel_at property will be set with the timestamp of when the Subscription will cancel
ok, but why I need both?
Not sure what you mean by that
cancel_at_period_end then the cancel_at
you mean set this to on a single request to Stripe, no?
If cancel_at_period_end is set, then cancel_at will automatically be set to the corresponding timestamp
they don't do the same thing? only the difference is one (cancel_at_period_end) only cancels the sub when the period ended and the other one (cancel_at) you can choose to do this before or after (your choice)
You don't pass both
oh, ok
ok, so the plan would be when a customer chooses to go to a FREE plan update the subscription with cancel_at_period_end: true and create the schedule to update the subscription to FREE on this date cancel_at
right?
so essentially we cancel_at_period_end the subscrioption and when this will happen the schedule will run and move the user to the FREE plan
does this make sense?
No I really think you are mixing things up at this point.
If they are moving to a free plan then the Subscription isn't canceling at all
So you wouldn't set cancel_at_period_end: true
You want to create the schedule and not set cancel_at_period_end.
If you are moving the Subscription to the free plan at the end of the period then you could look at the current_period_end timestamp (https://stripe.com/docs/api/subscriptions/object#subscription_object-current_period_end) if you need to know that exact timing where it will transition to free
Ok, but how would i know this schedule will happen and what will do?
At this point let's pause.
I'd recommend you go test this out.
You can use test clocks (https://stripe.com/docs/billing/testing/test-clocks) to advance time
And see exactly how this would all work
Talking in hypotheticals makes understanding it really hard
So actually testing it out will give you a much better understanding
Ok, will test this