#ramonp99_best-practices

1 messages ¡ Page 1 of 1 (latest)

crisp heartBOT
#

👋 Welcome to your new thread!

⏱️ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime!

🔗 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/1212727486438309910

📝 Have more to share? You can add more detail below, including code, screenshots, videos, etc.

⏲️ 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. Thank you for your patience!

frosty sapphireBOT
dark compass
#

I would only want to allow customers to change 'basic monthly' to 'premium monthly', and 'basic yearly' to 'premium yearly'

#

And possibly also basic monthly to premium yearly

frozen flame
#

Sure, you can define the matrix of product/prices that are available to update to when you create the portal session

dark compass
#

Yes I found these docs (and also the config on the webportal)

#

However this only allows you to specify which products support changing plans

#

So currently it is possible to switch from basic monthly to basic yearly, and maybe even to premium basic or premium yearly

#

That is when I add all of the plans in the configuration

#

However that also allows customers to change from premium yearly back to basic monthly

#

And I don't want that

#

So for customers with the basic plan, it should show different options to change to compared to users with the premium plan

frozen flame
#

Yeah it won't adapt to the plan(s) the customer is currently subscribed to. You'd need to create the configure the reflect their current subscription

dark compass
#

What if they have multiple active subscriptions, for example they have basic monthly and basic premium?

frozen flame
#

So you'd need to lookup their active plan prior to creating the portal session, and create/use a configure that reflects the upgrade options they should have

dark compass
#

Because in that case you'd be able to change between all plans right?

#

You cannot provide a configuration per plan

#

Only fetch the plan beforehand, and provide all possible plans to change to