#Luiz Azevedo
1 messages · Page 1 of 1 (latest)
Hello
That's a really long doc and we are helping multiple folks here at the same time
hello
Can you summarize your issue?
Otherwise you are going to be better off sharing that doc with our Support team over email
And they can take a deep look at it
OK. I'll try to summarize here.
Basically I have a configuration that I can use when creating a customer portal without specifying a flow when creating the portal.
But I need to create the flow subscription_update with this configuration, and when I try to create it I get the following error.
{
"error": {
"message": "The PortalConfiguration's subscription update feature does not allow base price or addon updates.",
"request_log_url": "https://dashboard.stripe.com/test/logs/xxxxx",
"type": "invalid_request_error"
}
}
So I would like to understand why I can use this configuration when creating a customer portal when I don't specify that it is a subscription_update flow.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Can you provide me the actual request ID from that error so I can look at exactly what you are doing?
This is curl with error, I change my key in the call..
curl --location 'https://api.stripe.com/v1/billing_portal/sessions'
--header 'Content-Type: application/x-www-form-urlencoded'
--header 'Authorization: Basic xxxxxxxx'
--data-urlencode 'customer=cus_OFW0TEbJvYSNJ5'
--data-urlencode 'return_url=https://example.com/account'
--data-urlencode 'configuration=bpc_1NTNj7Bb2P8uShrMjbgZc9u6'
--data-urlencode 'flow_data%5Btype%5D=subscription_update'
--data-urlencode 'flow_data%5Bsubscription_update%5D%5Bsubscription%5D=sub_1NT96FBb2P8uShrMdUKhgAtm'
--data-urlencode 'flow_data%5Bafter_completion%5D%5Btype%5D=redirect'
--data-urlencode 'flow_data%5Bafter_completion%5D%5Bredirect%5D%5Breturn_url%5D=https://example.com/account'
Just looking for the request ID
Looks like req_xxx
You removed it from the error you provided above
you want this:
{
"error": {
"message": "The PortalConfiguration's subscription update feature does not allow base price or addon updates.",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_JRFkv86w2Gx8TP?t=1689253224",
"type": "invalid_request_error"
}
}
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 problem.
@molten sentinel okay I think the issue here is that your Billing Portal Config is only allowing for quantity updates
But with that deep link flow it wants to allow for Subscription Price updates as well
Can you try adding default_allowed_updates[]: 'price' as well to your config
And then try again?
@glass wren -If I put the price it will work, but not in the way I want and it doesn't solve my problem.
Because when the customer has an annual subscription, I don't want to allow the customer to change the annual plan to monthly.
Hmm but your config does include two Prices
One that is annual and one that is monthly
Yes.
So then I'd try removing the monthly Price from the config
Yes.
What happens if you do that?
if i remove price from the list i get another error.
{
"error": {
"message": "This PortalSession cannot update subscription sub_1NT96FBb2P8uShrMdUKhgAtm because the configuration bpc_1NTPvkBb2P8uShrMiyMOECwp does not have any valid prices to switch to in its features[subscription_update][products]. This can be because there are no prices with a matching currency or tax behavior.",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_yBQvZIKzAro8TY?t=1689256314",
"type": "invalid_request_error"
}
}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Interesting
Thanks for testing
Let me check if it is possible to just update quantity in this flow
I thought it was but now I'm not so sure
Oh
You still have price
Now you need to remove price from your default_allowed_updates
Since now you only have one Price
Right.
I'll try..
removed price from update and product list
{
"error": {
"message": "The PortalConfiguration's subscription update feature does not allow base price or addon updates.",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_LwIYycA4NtGUFv?t=1689256736",
"type": "invalid_request_error"
}
}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
This subscription_update flow is not allowing you to change only the amount of the current plan. But that in the default flow of the stripe is allowed.
Well that just feels wrong. I definitely think that should just work 😦
Give me a moment to look at one more thing
Otherwise I'll have to put in a feature request to get this added
OK. Thank you very much.
Okay yeah sorry this is really unintuitive and I agree this should just work fine.
I'm filing feedback now for a feature request to get this ability added
As a workaround I'd suggest using the subscription_update_confirm flow for now
You'll need to collect the quantity update ahead of the portal redirect
But then you can use the portal to handle the rest
I thought about it, but I don't own the quantity that the customer will update.
So I would have to create a previous flow, before arriving at the customer portal.
And for this flow I need to make more requests to collect more information, such as the subscription item id
Hmm not sure I understand
You already have an authorization flow right?
Since you are creating Billing Portal Configs specifically for the customer here?
Yes.
and for now my idea is to solve it like this:
When the customer has an annual plan, I will use the standard flow.
When the customer has a monthly plan, I will use the subscription_update flow.
That would work too
Yes.
But she would have different flows with different views, and she wouldn't like that. So I would like to always use a single stream.
Right well until we provide the deep link just-quantity update flow you will need two different flows here
No way around it really right now
Yes. I agree with you.
But I'm already happy that in the future this will be possible, then I'll update when it's available.
And I'm also glad someone was able to actually understand my real problem.
thank you my friend. I'll be waiting.
How can I follow this process?
You can reach out to our Support team via https://support.stripe.com/contact/login and ask them to notify you once the feature has launched