#adrian_subscription-proration

1 messages ยท Page 1 of 1 (latest)

next sluiceBOT
#

๐Ÿ‘‹ 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/1220151367675547721

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

maiden radishBOT
cyan burrow
#

@wispy anchor that's something we support yes but mostly by having you decide how to handle this in your own code really. See https://stripe.com/docs/billing/subscriptions/upgrade-downgrade as a first step.

The idea is that when someone upgrades you might want to either charge them for the difference immediately with proration_behavior: 'always_invoice' or even reset the billing cycle to right now.
When they downgrade you instead might want to defer the change until the end of the period which can be done with a SubscriptionSchedule, see: https://docs.stripe.com/billing/subscriptions/subscription-schedules/use-cases#downgrading-subscriptions

#

adrian_subscription-proration

wispy anchor
#

do you get what i mean?

cyan burrow
#

Not really no

wispy anchor
#

So lets say a user is downgrading, default behaviour is proration_behavior: 'always_invoice'. They will see this right (see img).
but if i manually change it based on the condition that they are downgrading, they wont be able to see that they will pay end of billing period.

cyan burrow
#

Yeah I'm sorry I don't really get your picture and what;'s wrong with it exactly?

wispy anchor
#

hahahaha ok let me try again

#

So, if a user Upgrades to a higher plan, i want to invoice/bill immediately. If they Downgrade to a lower plan, i want to invoice end of billing period.

I need a way of changing the proration_behaviour depending on the above condition. Right now i only of setting a default one. I need a way of updating it based on the plan they chose.

cyan burrow
#

so you create two separate CustomerPortal Configurations, one for each case and you use the right one depending on whether to upgrade or downgrade

wispy anchor
#

Ah right, how will i determine which plan they chose tho since they are choosing it in the Billing Portal UI?

#

because at that point, they are already on a billing portal with a default configuration.

cyan burrow
#

Yes sorry that's what I was trying to say. What you want to do is impossible right now. If you want to have a different proration behaviour based on whether they upgrade or downgrade you have to make two separate CustomerPortal Configurations entirely. One for upgrade and one for downgrade. You can't let the portal offer both and then change the proration logic based on that

wispy anchor
# cyan burrow Yes sorry that's what I was trying to say. What you want to do is impossible rig...

I see. One issue with that is i have a deeplink for the subscription update page so they can upgrade/downgrade to a different plan.

Sceneario:

  • User chooses to downgrade and gets redirected to billing portal subscription update with a default configuration of proration_behaviour: create_prorations.
  • Once they checkout (downgrade their plan), they can go back to the start page of teh billing portal.
  • Since this portal session has teh default configuration of proration_behaviour: create_prorations, if they try to upgrade their plan, they will be billed end of period instead of immeditaly since they are still using that downgrade billing protal configuration session.
cyan burrow
#

yeah you basically have to not use a default configuration for cases like this one I think

wispy anchor
#

im trying something right now where i set 2 different configs like u said and then assign it to downgrade/upgrade plan button on my app that redirects the user to the billing portal.

#

๐Ÿคž

wispy anchor
#

and invoices per specified proration period

cyan burrow
#

Yay! Sorry it's a bit convoluted

wispy anchor
#

hahah na allgs lol i explained it very poorly. Thanks alot for the help