#sayori_best-practices

1 messages · Page 1 of 1 (latest)

sour fjordBOT
#

👋 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/1291826976721600566

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

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.

modern path
#

Taking for example the twitter thread:

You can do it via API though but then you have to deal with 3DS etc on your site which is a huge pain

One fix would be to calculate how much of the credits of the previous plan are used (eg 50%) vs how much of time is protated (eg 10%)

And then deduct because they only paid 10% of previous plan for 50% of its credits

Sounds like hard math though

If a user were to upgrade, I would want to refund 50%, rather than refund 90%. is that something that can be set up on the Portal?

#

And if that were not possible, I would prefer that users only be able to downgrade their price through the Portal, rather than upgrade or downgrade. Is that something that can be supported easily? I notice that stripe.billing_portal.Configuration.create accepts a features.subscription_update.products.prices field to list which prices a subscription could update to. But given we have tons of prices for tons of different currencies, I would assume this means we create a new Configuration for every single currency for every combination of tiers a user could downgrade - that sounds like a lot. Any alternatives?

dire quiver
#

Hi there

modern path
#

Hello :)

dire quiver
#

No, the portal can't be customized in this way. Prorations are either "on" or "off". Additionally, prorations in general are calculated based on the exact time when the subscription is changed so this will get really complex quickly

#

Like, you'd likely have to create a new price on the fly for the amount you want to charge (vs. creating prorations and switching to the new price)

modern path
#

Right - then I'm planning to use invoice items per Koopajah's suggestion - that worked out for me, if we handle upgrades ourselves and not with the Portal at all

#

That leads me to the second question I had in mind - how can we configure the Portal to "only allow downgrades"?

#

let's say I have three products: prod_1, prod_2, prod_3, each with three currencies supported: USD, KRW, EUR. Users in prod_3 would be able to downgrade (at the end of the period) to prod_1 or prod_2, but depending on the currency, I'd have three different Configuration objects, one for each currency. Then users in prod_2 would downgrade to prod_1, which is another three Configurations. This quickly becomes a lot of Configurations if I have more supported currencies. Is there an alternative?

dire quiver
#

I think this flow is too complex for the portal without, as you said, having to manage lots of configurations

#

The alternative at this time would be to manage this logic on your end, which would mean creating your own "portal" of sorts, where you'd only surface the available price(s) after inspecting the authenticated user's current price

sour fjordBOT
modern path
#

Okay, thanks for the info so far. Would stripe.com/support be the right place to go to see if we could be included in the beta program for "Wait until end of billing period to update" when switching to a cheaper subscripiton?

dire quiver
#

Where do you see this text exactly? The reason I ask is that kind of functionality is available with Subscription Schedules but that's separate from the customer portal

modern path
#

https://x.com/levelsio/status/1840285503519928645 is reportedly a beta feature. based on the screenshot in the twitter post, it seems like it would be present underneath "Prorate subscription updates" of the Customer Portal settings page, which I've attached a screenshot of too

@sathoro_ Yep there's still that indeed

Problem is if you disable protating in Portal for upgrades too, then it won't do immediate upgrades but instead wait till next month

You can do it via API though but then you have to deal with 3DS etc on your site which is a huge pain

One fix

subtle owl
#

Hi, I'm stepping in and catching up here. Thank you for your patience.

modern path
#

nice to meet you! take your time, I'm at lunch

subtle owl
#

Yeah, I can't quickly find what they may be referring to. We are not able to discuss Beta features here so I recommend that you reach out to support. Our support team will be able to assist you better than I can: https://support.stripe.com/contact