#lmifflen - customer portal configuration
1 messages · Page 1 of 1 (latest)
Hi there
Hey!
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
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
Yeah since this can be multiple products it would be an array of objects
Okay so [{"product": "abc"}, {"product": "xyz"}] ?
Each entry in products needs to be an object -- the docs show this should have product and prices keys
Yea
okay i'll give that a try right now. thanks.
IIRC you'll need to specify prices as an array of prices you want the portal to use, too
prices: ['price_123', 'price_456']
Okay so I have given that a try:
I receive and error: stripe.error.InvalidRequestError: Request req_2XE86k0ejkBfpJ: Invalid array
Yep, looking at the error its specifying a different parameter, though:
features[subscription_update][default_allowed_updates]
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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?
Okay. That worked. Thank you. Also where are you seeing these errors?
eg, you can see the parameter name shown in the error response body: https://dashboard.stripe.com/test/logs/req_2XE86k0ejkBfpJ
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
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!
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
We cover a bit of this in our new error handling guide: https://stripe.com/docs/error-handling?lang=python#catch-exceptions
ie, how to catch invalidrequest errors etc
Sweet. I'll have a look through that.
lmifflen - customer portal configuration