#lmifflen - customer portal configuration

1 messages · Page 1 of 1 (latest)

pallid lanternBOT
late bough
#

Hi there

hidden shell
#

Hey!

late bough
#

Are you seeing an error when doing this? Or can you tell me more about the issue you are encountering?

#

Ah I see

#

The issue is that products is a hash

hidden shell
#

Yeah so I get an error: stripe.error.InvalidRequestError: Request req_igaQyPcQNF447j: Invalid object

#

I have tried changing it to an object then I get an error: Invalid array

late bough
#

Yeah since this can be multiple products it would be an array of objects

hidden shell
#

Okay so [{"product": "abc"}, {"product": "xyz"}] ?

crude pasture
#

Each entry in products needs to be an object -- the docs show this should have product and prices keys

#

Yea

hidden shell
#

okay i'll give that a try right now. thanks.

crude pasture
#

IIRC you'll need to specify prices as an array of prices you want the portal to use, too

#

prices: ['price_123', 'price_456']

hidden shell
#

Okay so I have given that a try:

#

I receive and error: stripe.error.InvalidRequestError: Request req_2XE86k0ejkBfpJ: Invalid array

crude pasture
#

Yep, looking at the error its specifying a different parameter, though:

#

features[subscription_update][default_allowed_updates]

#

that too needs to be an array

#

"default_allowed_updates": ["price"]

#

When you're hitting these, are you surfacing the API error details in a way you can inspect?

hidden shell
#

Okay. That worked. Thank you. Also where are you seeing these errors?

crude pasture
hidden shell
#

No. The errors do not seem readable in a way I am used to interpreting anyways.

#

Ah perfect. Now I know where to look. Thank you!

crude pasture
#

NP! yea you can always look in the dashboard to see the details. The same would be included in the error the client SDK gets, but you'd need to log it out / otherwise directly inspect the response

#

ie, how to catch invalidrequest errors etc

hidden shell
#

Sweet. I'll have a look through that.

crude pasture
#

lmifflen - customer portal configuration