#_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1295308657566941226
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- _customer-portal-tax-id, 2 days ago, 8 messages
What do you mean by request Id? I'm creating sessions from the code
yes I just want to see how you're passing the allowed updates
Toby answered me with this, but I'm not able to understand where I can find Update information link in the Billing and Shipping Information
"I don't think tax IDs are expected to be editable from the second screen that you shared. Instead I'm seeing the ability to edit those provided via the Update information link in the Billing and Shipping Information section in the customer portal. Do you see the ability to edit tax IDs there?"
read this to find the request ID https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
var options = new BillingPortal.SessionCreateOptions
{
Customer = customer.Id,
ReturnUrl = returnUrl,
Configuration = configuration?.Id,
FlowData = new BillingPortal.SessionFlowDataOptions
{
Type = "subscription_update_confirm",
SubscriptionUpdateConfirm = new BillingPortal.SessionFlowDataSubscriptionUpdateConfirmOptions
{
Subscription = subscription.Id,
Items = new List<SessionFlowDataSubscriptionUpdateConfirmItemOptions>
{
new() {
Id = subscription.Items.FirstOrDefault()?.Id,
Quantity = request.Request.Quantity,
Price = price.Id,
},
},
},
AfterCompletion = new Stripe.BillingPortal.SessionFlowDataAfterCompletionOptions
{
Type = "redirect",
Redirect = new Stripe.BillingPortal.SessionFlowDataAfterCompletionRedirectOptions
{
ReturnUrl = returnUrl,
},
},
},
};
var service = new Stripe.BillingPortal.SessionService();
var session = await service.CreateAsync(options);
what you need to enable is
https://docs.stripe.com/api/customer_portal/configurations/create#create_portal_configuration-features-customer_update-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.
Here is request ID req_Zl7nvryX79VxLj
and the request ID for creating the Session please?
This req_H5sBoGpHQeRc5C is now fresh I just created it.
this is just a GET request to fetch the configuration
How to find the session id, tell me please
I found it no worries
req_Ba6twwxmTTGVks
but the problem is that you're doing a deep link flow https://docs.stripe.com/customer-management/portal-deep-links
which means that the customer would only be able to do 1 thing
Yes I'm using deep links
We are changing the subscription quantity from our portal and want to hide/disable the possibility to be changed from the billing portal
I understand
but the problem is that your flow is a subscription update one not a customer update
so you won't be able to allow changes to the customer's tax ID
Yes, but if user not entered the payment method previosly stripe asking to add it, and I just want to see on this page the same fields like I can create via payment link
Like here
that's what I'm trying to say, it doesn't work the same way
Okay np, maybe you have an alternative way?
Or only collecting this data from our portal and pass it to customer object?
I think it's best if you don't use deep links
and give your customer the chance to update their information directly on the customer portal
or yes if you prefer collecting the information ahead of time and update the customer object that's also another solution
I tried first without them, but If I disable editing quantity, also I'm not able to update then creating session
I'm not able to update then creating session
what do you mean by that?
This is better for us, but can you help with quantities?
you just remove quantity from https://docs.stripe.com/api/customer_portal/configurations/create#create_portal_configuration-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.
If I use features.subscription_update and remove the quantity from allowed_updates, but pass the new quantity from our portal, API crashes with something like "You're not able to update the quantity because the quantity update is disabled"
Okay I think I can disable the quantity and update it via api and after that create the session, what do you think?
Thank you @limpid gorge ! Would try that solution
Thanks for your help, because I thought deep links had all the features.
Seems unlogic for me to have these features only for some sessions but not for deep links for example, or if I not allowed to change the quantity I'm also not able to update it passing inside the update session object
I understand, but the idea of deep links is to restrict the customer from exploring other flows and just focus on one
I agree, but this one flow would be nice to be configurable like you want ๐