#Mustafa
1 messages · Page 1 of 1 (latest)
hi, having a look.
you need to pass products inside the field that the error message is mentioning https://stripe.com/docs/api/customer_portal/configurations/create#create_portal_configuration-features-subscription_update-products
just retrieving the object from the API, modifying it, and submitting that object, won't work, because there are fields on the response that are not included by default, and the response object is not always the same shape as the request parameters.
as in this case, where subscription_update.products is an expandable list that is not included by default (https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products) .
Hi, thanks for answering.
What if I don't want to add products?
you have to.
the configuration already has products defined, to be clear.
it's just that by default, those are not included in the response when you call stripe.billing_portal.Configuration.retrieve, which is why you don't see them, and why your update request is missing them. (which is what I'm explaining above).
How to fetch products in the given configuration?
If it is not included by default. is there some way to include them and see?
yes, they're expandable
https://stripe.com/docs/expand with ["features.subscription_update.products"]