#_code

1 messages ยท Page 1 of 1 (latest)

dreamy mothBOT
#

๐Ÿ‘‹ 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.

limpid gorge
#

๐Ÿ‘‹ happy to help

#

would you mind sharing the request ID

signal oar
#

What do you mean by request Id? I'm creating sessions from the code

limpid gorge
#

yes I just want to see how you're passing the allowed updates

signal oar
#

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?"

limpid gorge
signal oar
#

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);

limpid gorge
signal oar
#

Here is request ID req_Zl7nvryX79VxLj

limpid gorge
#

and the request ID for creating the Session please?

signal oar
#

This req_H5sBoGpHQeRc5C is now fresh I just created it.

limpid gorge
#

this is just a GET request to fetch the configuration

signal oar
limpid gorge
#

I found it no worries

#

req_Ba6twwxmTTGVks

#

which means that the customer would only be able to do 1 thing

signal oar
#

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

limpid gorge
#

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

signal oar
#

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

limpid gorge
#

that's what I'm trying to say, it doesn't work the same way

signal oar
#

Okay np, maybe you have an alternative way?

#

Or only collecting this data from our portal and pass it to customer object?

limpid gorge
#

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

signal oar
#

I tried first without them, but If I disable editing quantity, also I'm not able to update then creating session

limpid gorge
#

I'm not able to update then creating session
what do you mean by that?

signal oar
limpid gorge
signal oar
#

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"

limpid gorge
#

oh yes that won't be feasible

#

you either want to change the quantity or not

signal oar
#

Okay I think I can disable the quantity and update it via api and after that create the session, what do you think?

limpid gorge
#

you need to choose

#

yes that might be a better solution I think

signal oar
#

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

limpid gorge
#

I understand, but the idea of deep links is to restrict the customer from exploring other flows and just focus on one

signal oar