#derekyau-Subscription
1 messages · Page 1 of 1 (latest)
Customer Portal can be created with Portal Configuration, and you can restrict quantity update https://stripe.com/docs/api/customer_portal/configurations/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
But I am not sure about the part "dynamically". Maybe you could create separated configuration per team, and then create different customer portal for them?
Thanks @toxic gazelle from the docs it looks like I can override features.subscription_update.default_allowed_values which is an array but it doesn't seem to let me specify a specific quantity.
Here's the use case: My app has the concept of "billable users" and "free users". When I send a customer to the billing portal I would like to restrict the customer from selecting a lower quantity than current "billable users". If they want to select a lower number, they should remove a "billable user" and "free up the seat" before they can downgrade?
Does that make sense?
The alternative flow to this I guess is just to let them downgrade the quantity to whatever and then when I receive the webhook, some billable users just lose access?
not sure what the best way of handling this is
@honest jolt any ideas? ^
hey there, give me a second to catch up
there isn't currently a way to specify a minimum (floor) when adjusting the quantity in the customer portal. Perhaps one idea to consider is to ask the user to sign up for a new subscription if they want to add more seats?
I see… I’m not too worried about them adding seats as they can just increase the quantity… removing seats seem to be the issue here
i'm a bit confused about why they need to remove a billable user and free up the seat before they can downgrade - maybe could you explain more about this?
Ah, sure
So in order of steps:
There are two types of users in my application. Collaborators (free) and editors (paid)
-
The user admin buys X “editor seats” to the application (this is handled via Stripe checkout) this is on a “workspace” level
-
User admin can upgrade or downgrade users in their organization to “editor” level up to the maximum number of licenses they have purchased
-
if user wants to have more editors they can go to the customer portal and purchase a higher quantity to get more seats and then return to the app to add more editors
-
the problem is when they go to the customer portal and remove quantity. I would like to restrict the minimum to the current of active editors they have right now. If not, then technically they will have more active editors than they paid for
Does that make sense ?
Did that make more sense @honest jolt ?
yep, let me think about this a bit
honestly, I don't think the customer portal is a great fit for this use case mainly because we don't allow you to set a minimum number. I think you would be better off building your own "portal"
I see… yeah this is a limitation but maybe will have to keep it for now since we don’t have enough time to build a custom portal
Thanks for your thoughts…
sorry, wish that i had a better solution for you, but nothing is coming to mind
@honest jolt just one more question to clarify
The link to the customer portal configuration above (https://stripe.com/docs/api/customer_portal/configurations/create)
Seems to mention quantity. Is this just a binary “you can edit quantity” and “you can’t edit quantity?”
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Otherwise as suggested one solution would be to create a new configuration for each workspace?