#budinov-customerportal-prices

1 messages ยท Page 1 of 1 (latest)

finite yewBOT
unreal mason
#

@brittle surge Hello! I'm not sure I understand the question exactly. What have you tried/what's not working?

#

budinov-customerportal-prices

brittle surge
#

ok, so I on this page i can manually add subscription products to the customer portal session

#

I want to do the same thing using the stripe API, but I cant find how?

unreal mason
brittle surge
#

sure, but I dont see any field here related to the "eligible products that customers can update"

brittle surge
#

oh yes, I dont know how i missed it

#

thank you ๐Ÿ™‚

unreal mason
#

it's a bit nested because there are a lot of things you can configure

#

but hopefully that solves your ask!

brittle surge
#

it does for sure

brittle surge
#

hey I have one more question if you are still here ?

#

does the default portal configuration have ID i can get and update it through the API ?

unreal mason
#

what have you tried?

#

Like you can do all of this in Test mode, did you try to list them and see what you get back?

brittle surge
#

ok yes i think it will do the job, thanks

#

only now when i try to update the configuration it gives me this error - "Invalid array"

#

$this->stripeClient->billingPortal->configurations->update(
'bpc_1NgRmKIoheMXsmWO6zsDHJmK',
[
'features' => [
'subscription_update' => [
'products' => [
'product' => 'product_id',
'prices' => [
'price_id_1', 'price_id_2'
]
]
]
],
]
);

#

with this code. What is the prices array supposed to look like?

unreal mason
#

If you read the error carefully it tells you the issue is with products not prices right?

#

it's an array of arrays since you can pass multiple product configuration

finite yewBOT
brittle surge
#

yep that was it, sorry for the obvious mistakes. Was a long day for me

#

thanks again and wish you a great day/night ๐Ÿ™‚