#drewzoviek_docs
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1409957730617266320
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hello! i have read your question and your end goal isn't completely clear to me. it sounds like you want to allow users to upgrade or downgrade, but do you want to charge them for the upgrade immediately?
i think it might be helpful if you give me an example walking through exactly what you want to have happen
e.g.
- on Jan 1, a user signs up for tier A
- on Jan 15th, the user upgrades to tier B
- user is charged immediately for upgrade
I want the system to charge the upgrade difference immediately and continue with the new tier for the next billings. The downgrade they won't get charged immediately but the next billing they will be charged the downgrade plan instead of the current plan
In your scenario, user will be charged the difference from tier a to tier b price immediately on Jan 15th
Let me get a full scenario for you in both cases, one second. I really appreciate your time
ok cool, so in cases where you want to charge immediately, you want to use proration_behavior="always_invoice"
https://docs.stripe.com/api/subscriptions/update#update_subscription-proration_behavior
and for the downgrade scenario you would do proration_behavior="create_prorations"
Tier 1 - 10 dollars
Tier 2 - 20 dollars
Upgrade - User buys tier 1 on jan 1, upgrades to tier 2 on jan 15. They will be charged 10 dollars for the upgrade difference and jan 30 they will be charged 20 for the new plan billing
Downgrade - User buys tier 2 on jan 1, downgrades to tier 1 on jan 15. They will not be charged anything, until the next billing cycle which will charge them 10 dollars for tier 1
If these are not clear please let me know
In Stripe, I currently have these three plans on separate products with two prices, monthly and annual billing.
I also have one product which includes all tier prices with their monthly or annual prices.
I'm not sure which one to use.
ok yes, for the upgrade scenario proration_behavior="always_invoice" is what you want
for the downgrade scenario, do you want to give them credit back for downgrading on the 15th?
or do you want to schedule the downgrade for the future?
or downgrade immediately and not give them credit back?
for example of the credit scenario, you could say "you payed $20 for a whole month of tier 2, but you only used half of that, so we're going to give you a $10 credit back"
My system is currently set to downgrade immediately, so giving them credit back in your case would be fair to the user. In your scenario, "you payed $20 for a whole month of tier 2, but you only used half of that, so we're going to give you a $10 credit back" would be correct and the user will be billed $10 dollars for the next billings not $20 dollars
ok cool! so in that case proration_behavior="create_prorations" is the correct approach
if you did not want to credit them back you could use proration_behavior="none"
and just for completeness, if you decided you just wanted to schedule the downgrade for the future, you could do that with subscription schedules
https://docs.stripe.com/billing/subscriptions/subscription-schedules
Thank you, I'm not sure what should I ask more about it. Only that how should I structure these three tiers with different billing cycles monthly/annually in my product catalog?
for that you'll want 3 products with 2 prices each (for a total of 6 prices). each product should correspond to a tier, and then each product should have a monthly and annual price associated with it
Ok, I'll try implement your systems to the current ones. Thank you very much for your time Solanum.
yep of course! happy to help ๐
one other thing i would strongly suggest doing (if you haven't already) is familiarizing yourself with test clocks and using short test scripts to run through scenarios you are trying to implement
https://docs.stripe.com/billing/testing/test-clocks
you can use that to experiment really quickly and figure a lot of this stuff out on your own. sometimes when people come to me with questions here that i don't know the answer to, i'll just pull up my own test clock scripts and test them out in real time
I'll give that a go too, thank you ๐
yep of course! i'll keep this thread open for a little bit longer in case you have more questions
When the user upgrades or downgrades their plan, should a checkout session be loaded? Or something else?
it's not really typical to use checkout in any way once a subscription already exists. most of the time you would just call the "update a subscription" API directly
and then if the collection_method is set to "charge_automatically" (which is the default) then we'll automatically attempt to charge the card on file
So the typical scenario would be once an upgrade or downgrade happens, the front end just tells them they have the new plan and their credit card transaction will tell them the rest
yep!
the only scenario where you would typically bring them into some kind of check out flow would be if their payment method failed
I'll keep that in mind. Thank you for helping me navigate these systems. It's my first time creating my own react project so knowing what people should expect in each scenario really helps and different options for a subscription system