#jasperste_api
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/1342067660246224946
đ 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.
- jasperste_api, 17 hours ago, 25 messages
hi there!
Hi Soma, this is the cli command I used
stripe billing_portal configurations update bpc_1O2YmRJ7quAeFV5oPS6V8DlY -d "features[payment_method_update][enabled]=true" -d "features[subscription_update][enabled]=true" -d "features[subscription_update][default_allowed_updates][0]='quantity'" -d "features[subscription_update][default_allowed_updates][1]='price'" -d "features[subscription_update][products][0][product]=prod_RgNiK6CfgZWZy8" -d "features[subscription_update][products][0][prices][0]=price_1QrGDCJ7quAeFV5oHIJm3yz3" -d "features[subscription_update][products][0][prices][1]=price_1QrGDCJ7quAeFV5oGUhYHFUm" -d "features[subscription_update][products][1][product]=prod_Osr31La5Ydtl1b" -d "features[subscription_update][products][1][prices][0]=price_1QrGEjJ7quAeFV5oQcPP6550" -d "features[subscription_update][products][1][prices][1]=price_1QrGEkJ7quAeFV5oTxTV7DgQ"
I also tried to remove the second list item, but the portal keeps giving me options to switch between products
When clicking 'Update subscription' in the billing portal it leads to a page where I can suddenly change the products.
If I understand correctly, if the user has a monthly price, he should be able to upgrade to a yearly price. but if they are on a yearly price, then they cannot change price?
if so, you would need to create two different portal configuration for this.
It would be fine if they could switch between yearly and monthly. However they can now switch their subscription to a different product
In short. We offer 2 products, one base, one seats model. We would like to allow them to switch from month to year within the portal. But if we allow that it also gives a option to switch the seats product to a the base product (or visa versa), meaning they will have 2 base products
Top option is great (monthly + yearly), but the option between Your Team and Vev+ is not desired
got it. but my answer is the same: you would need 2 configuration.
That's good to know, then I will stop trying to do it with one
Thanks Soma. I will discuss with the team. Have a good day
Do you happen to know if it's possible to configure/open a secondary portal via the dashboard? (saves us some logic)
I'm not sure I understand. what do you mean by "secondary portal via the dashboard"?
You can configure the 'default' portal via https://dashboard.stripe.com/test/settings/billing/portal
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
in some screens you have the option to switch configurations so you can just configure it via the dashboard instead of the API
got it. but no it's not possible to have a secondary portal configuration in the Dashboard. you need to use the API to have multiple configurations
All right. Thanks again
After trying some things out, what would a secondary configuration help if a customer has both a base (product 1) subscription as well as a seats (product 2) subscription? With a secondary configuration I still can't configure it in a way that this customer can only change the interval
If they open one of the configurations they can either switch product 1 to product 2 or product 2 to 1
Hi. I'm taking over from my colleague. Please, give me a moment to catch up.
Basically you have a Subscription with 2 Prices, and you only want to allow switching the interval on both of them?
We have 2 products with both 2 prices (so 4 prices in total). I would like to allow to switch prices, but not switch products indeed
Customers can have 2 subscriptions, they can update both, but the portal now allows to switch products for both of them (meaning they can change from product 1 to 2), while we only want to allow switching interval
if this is not possible via the portal we will build our own component btw, but we were a bit suprised the portal allows to switch products by default which can't be turned off
The problem is, to switch to a different interval, you would need to change both Prices simultaneously, but I don't think Portal supports that. Otherwise, if you do it in 2 steps, after the first step you would end up with a Subscription with 2 different intervals monthly+yearly, which is not allowed.
The latter is currently possible, it's just a different subscription object
Wait. Does the Customer have 2 Subscriptions? Or Subscription with 2 Prices?
2 subscriptions indeed
we have
Plus (yearly and monthly price)
Seats (yearly and monthly price) <- recently added
Before we added Seats allowed users to switch from interval (price) for Plus in the portal. Now that we added 'Seats' the can also change 'Plus' to 'Seats' in the portal, which will break things (since they will have 2 separate subscriptions of the same product)
That's why we were looking for a solution to limit it in the portal, but I start to think this is currently impossible
You should be able to limit a Portal Session to only one of the Subscriptions.
Alternatively, you could utilize Flows to perform a targeted update: https://docs.stripe.com/customer-management/portal-deep-links
Is there documentation to that limit to only one of the subscriptions?
Hmm, sorry, my bad. I was actually thinking about the Flow: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-flow-subscription_update-subscription
No worries. I do think this flow argument will still allow switching products if we configure the portal to allow to switch prices
It looks like as soon as you allow to switch prices it will indirectly allow to switch products as well
The products/prices argument in the portal configuration seems to be an indicator to what the portal allows to update to.
We will might want to look into custom solution here
But are you setting this parameter in your Configuration? https://docs.stripe.com/api/customer_portal/configurations/object#portal_configuration_object-features-subscription_update-products
This includes both Products, which is why you're allowed to switch the Product.
You should only include one Product in the list.
Tried that, then it will still allow to switch from that one product to the other one..
This shouldn't be possible. Could you please share an example?
req_4IOJXM6e4USsyZ
this is the billing portal after that req (id = bpc_1O2YmRJ7quAeFV5oPS6V8DlY)
This is expected.
The Subscription is currently on Vev+, but the provided Product in the configuration is Your team.
Yes
So it's not possible to have 'update subsription' only support switching between yearly/monthly
You should only provide the Product that the Subscription is on currently, to prevent switching to a different product.
If a customer has 2 subscriptions I can't provide only 1 product, it will then still allow the other product to switch
It seems to me the only option is to not allowing updating interval here, because otherwise this customer could switch products for one of their subscriptions
Yes. Since your case is not as trivial as 1 Sub with 1 Item, it's better to use your own UI.