#dbugger-customer-portal
1 messages ยท Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- dbugger-testdata-deletion, 3 hours ago, 8 messages
- dbugger-pricingtable-login, 6 days ago, 125 messages
I tried to create a checkout session, but all I got is the message:
Checkout does not support multiple prices with different billing intervals.
Hello! Yes, have a look here: https://stripe.com/docs/payments/checkout/upsells
Oh, so that is what upsells are for, I see
Let me see..
Oh, nice, I see...
Small detail: If I create a checkout to the "price" with the upsell, the user can choose the yearly price
but if I create a checkout to the yearly price, the user cannot "downsell"
Isnt there a way to make a checkout where I can pre-select the user selected price, but still change it during checkout?
No, upsells are the closest thing we have to what you want. The other option would be to create a seclection page on your end prior to Checkout.
Which means that I am the one that have to manage the UI, for the user to select which pricing he wants to use, no?
Yes, if the Checkout functionality won't work for you you need to build the UI you want on your end.
What about the customer portal? Would it be possible to make it, so that the user can switch from monthly <-> yearly over there?
Yes, you can do that, but that only works with Subscriptions that already exist. You can't start a new Subscription from Customer Portal.
Yeah, I know you cannot create new subscriptions. Only update, upgrade or cancel them
But what is it that has to be done, for that option to show up?
Right now I only see the option to cancel it
You need to configure Customer Portal with the Prices you want people to be able to switch between.
Yes. ๐ There's also a way to configure settings in the Dashboard, but I'm not very familiar with doing it that way.
I notice that you have linked me to stripe.billingPortal.configurations.create
But in my code I have been using stripe.billingPortal.sessions.create
Am I using the wrong one?
Hi, taking over as rubeus needs to step away.
Thanks @uneven crow
You're not using it wrong. These are just two different APIs. The configuration, you can think of it as settings: https://stripe.com/docs/api/customer_portal/configurations. The Session one, https://stripe.com/docs/api/customer_portal/sessions you can think of it as an instance of when the customer uses the UI.
Does that help clarify it?
Let me see...
dbugger-customer-portal
mmm... hard to use, since it doesnt tell you why the configuration is wrong ๐
When it says here "Array of enums"
It is just an array of strings, no?
["price"]
(javascript)
Yes, it would be something like this: default_allowed_updates: ['promotion_code', 'price']
Shouldnt this config be valid?
Because I keep getting an "Invalid string" error, and I have no idea why... I have added all the required fields
You need to use stripe.billingPortal.configurations.create in this case as you're trying to create the configuration, right?
Oh, I thought that, since you said that sessions.create was a one-off, I could also set up a configuration
where can I then find the docs for billingPortal.sessions.create? I do not see it through the search field...
Oh, nevermind
I ask it, and I find it ๐
Ok, so I cant use that, then. The option is not there. I need to use the configuration.create
You'd want to follow this documentation: https://stripe.com/docs/customer-management/integrate-customer-portal. After you created that configuration, you can create the bolling session, https://stripe.com/docs/api/customer_portal/sessions/create.
Sure!
If I dont add a privacy_policy_url
it fails
Even though in the documentation is not marked as "required"
Mistake in the docs?
(it is also weird that business_profile is required, but none of its children... sounds like an empty object might work)
(but it doesnt)
I do not think so. The business_profile is required, https://stripe.com/docs/api/customer_portal/configurations/create which has 3 child parameters.
Are you saying you'd have expected 'required' to be added for child parameters as well?
Yeah, I know the business_profile is required, but its children do not appear as "required". I guess one could argue that if business_profile is marked as "required", all its children should be considered "required" as well
But then you see at other things like features:
And this is not the case here. Those children are not required
Seems a little inconsistent. Might lead to confusion.
I see, thank you for flagging. I think you can just pass any of it and it would work
My pleasure
My advice: be explicite and mark as required everything that is actually required
(or add notes in special cases ๐ )
In any case, thanks for your help!
๐ซ
Sure!