#Nils
1 messages · Page 1 of 1 (latest)
It's possible to do via API with having multiple billing portal configuration: https://stripe.com/docs/api/customer_portal/configurations/create#create_portal_configuration-features-subscription_update-products-prices
If the customer subscribes to product A, your system will apply the billing portal configuration of product A. Similarly for product B.
right so I need to put multiple billing portal links on our site, one for each product that the user is subscribed to? and then an additional portal link for them to edit their user info and see invoices?
It should only be one billing portal link. The same portal link will also allow user to edit their information and view invoices.
It depends on you set up the billing portal configuration. In the same billing portal configuration, it can be configured to edit information and view invoices.
You may refer to the guide here about the fields to configure: https://stripe.com/docs/customer-management/configure-portal
but what if the user is subscribed to both products? then how can I make it so updating a subscription is restricted to only prices of that product
I want to do this but I do not want users to be able to switch their subscription from one product to another
Stripe doesn't support this kind of solution out of the box. The billing portal configuration will have to be created for each product of this scenario.
The screenshot here allows user switching prices on different product
features.subscription_update.products.prices field should be used to restrict the prices that can be updated: https://stripe.com/docs/api/customer_portal/configurations/create#create_portal_configuration-features-subscription_update-products-prices
one more thing: when I only give one product in this list features.subscription_update.products to the portal configuration, I still see both products that I am subscribed to in the customer portal
so then I'm forced to create a billing portal with that billing portal configuration, and with flow_data of type subscription_update with the subscription id
which means I need multiple billing portal links in my website
Can you share the request ID (req_xxx) which you create the billnig portal? Here’s how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Ah, I see what your problem is
I was under the assumption that the difference in prices are under one single subscription instead of two separate subscriptions
right yes, a user can have a subscription for each (2) product we offer
It should be two products in two different subscriptions, right?
yes
two separate products in stripe, and the user will need to create two subscriptions if they wish to have both products
Then yes, flow_data will be required with corresponding subscriptions and multiple billing portals is the only way
right ok