#kurage
1 messages ยท Page 1 of 1 (latest)
What is the issue you are seeing exactly?
Thank you.
"features[subscription_update][products][0][product]"=<product ID>
is not reflected via the API.
@scenic quarry
request id is req_qKmyJ6xkwwiDaT
Thanks
Interesting
Can you retrieve the billing portal configuration with this endpoint: https://stripe.com/docs/api/customer_portal/configurations/retrieve
Does the price and product show up when you do that?
Looks like I didn't get it.
request ID: req_qKmyJ6xkwwiDaT
$ curl https://api.stripe.com/v1/billing_portal/configurations/<billong_portal_configurationID> -u <my_key>
"subscription_update": {
"default_allowed_updates": [
"price".
], { "default_allowed_updates".
"enabled": true, }
"proration_behavior": "none"
}
},.
...
Hello! I'm taking over and catching up...
Your request is likely working, but the features.subscription_update.products field isn't included by default, you need to expand it to see what's set there: https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products
You can expand it in the same request when you create it.
@near chasm
Hello,
Thank you for your reply.
You can expand it in the same request when you create it.
I have a rudimentary question.
Do you mean that the default_allowed_updates should only contain the price?
Sometimes it is not reflected even on the screen.
Sorry, I have to run an errand and will be late replying. ๐โโ๏ธ
Could it be the following?
I'll give it a try.
https://stripe.com/docs/api/expanding_objects
Yep, it's that the property in the response isn't included by default.
You need to expand it.
Your existing parameters look fine to me, you don't need to change anything you already have, you just need to add the bit to expand the property you want to see.
@near chasm
Is this correct?
$ curl https://api.stripe.com/v1/billing_portal/configurations/<billong_portal_configurationID> -u <my_key> \
-d "expand[]"="features.subscription_update"
"subscription_update": {
"default_allowed_updates": [
"price"
],
"enabled": true,
"proration_behavior": "none"
}
...
No, you need to expand features.subscription_update.products, not just features.subscription_update.
Look at the API reference and note which specific property is expandable: https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products
Oops, wrong link...
Fixed!
Thank you.
@scenic quarry @near chasm
I was able to get it!
$ curl https://api.stripe.com/v1/billing_portal/configurations/<billong_portal_configurationID> -u <my_key> \
-d "expand[]"="features.subscription_update.products"
"subscription_update": {
"default_allowed_updates": [
"price"
],
"enabled": true,
"products": [
{
"prices": [
"price_1NNcJRKSxGQdCRJGMgHvfB4J"
],
"product": "prod_O4VrkbwiUc2Z9D"
}
],
"proration_behavior": "none"
}
...
I am very happy that you answered my questions so kindly.
I was worried about using your service for the first time, but I was relieved.
Thank you very much.
Awesome!