#dbugger-customer-portal

1 messages ยท Page 1 of 1 (latest)

rain gullBOT
#

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.

nocturne lava
#

I tried to create a checkout session, but all I got is the message:

Checkout does not support multiple prices with different billing intervals.

uneven crow
nocturne lava
#

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?

uneven crow
#

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.

nocturne lava
#

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?

rain gullBOT
uneven crow
#

Yes, if the Checkout functionality won't work for you you need to build the UI you want on your end.

nocturne lava
#

What about the customer portal? Would it be possible to make it, so that the user can switch from monthly <-> yearly over there?

uneven crow
#

Yes, you can do that, but that only works with Subscriptions that already exist. You can't start a new Subscription from Customer Portal.

nocturne lava
#

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?

rain gullBOT
nocturne lava
#

Right now I only see the option to cancel it

uneven crow
#

You need to configure Customer Portal with the Prices you want people to be able to switch between.

nocturne lava
#

Let me see...

#

oh wow, thats a lot of options ๐Ÿ˜„

uneven crow
#

Yes. ๐Ÿ˜… There's also a way to configure settings in the Dashboard, but I'm not very familiar with doing it that way.

nocturne lava
#

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?

white inlet
#

Hi, taking over as rubeus needs to step away.

nocturne lava
#

Thanks @uneven crow

white inlet
#

Does that help clarify it?

nocturne lava
#

Let me see...

rain gullBOT
#

dbugger-customer-portal

nocturne lava
#

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)

white inlet
#

Yes, it would be something like this: default_allowed_updates: ['promotion_code', 'price']

nocturne lava
#

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

white inlet
#

You need to use stripe.billingPortal.configurations.create in this case as you're trying to create the configuration, right?

nocturne lava
#

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

white inlet
nocturne lava
#

Cool, it is working!

#

Thanks a lot!

#

Weird thing, though...

white inlet
#

Sure!

nocturne lava
#

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)

white inlet
#

Are you saying you'd have expected 'required' to be added for child parameters as well?

nocturne lava
#

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.

white inlet
#

I see, thank you for flagging. I think you can just pass any of it and it would work

nocturne lava
#

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!

#

๐Ÿซ‚

white inlet
#

Sure!