#geekcorner_best-practices
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/1302922587726417981
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Which path would you recommend basically?
Basically, which how would you do it basically, how would I update my intent when the payment method changes
can you be a lot more precise in your question? at what point exactly in your flow you want tu update the PaymentIntent? and what exactly do you want to update on the PaymentIntent?
whenever the user changes its payment method
I don't understand the question. can you explain with multiple sentence the exact flow you are having issues with? something like:
- the user is on my website, and I created a Subscription
- then the user click on this button
- at that point I want to change the default payment method of the user
- but, for this to work, I need to do X
- how can I do X?
sure let me think, i'm a bit tired today, sorry ๐
no worries. but the more details you share, the esaier it will be for me to help.
basically i'm unsure about how i should update my checkout items (custom checkout is basically Checkout API with Elements) whenever the users changes its payment method so it shows the proper informations ("includes free trial") in the confirm page
wait, you are using Custom Checout? That's something that is in beta, so we don't know much about it on Discord. you should reach out to support directly, and make it clear you are using this integration: https://support.stripe.com/contact
yeah i know it's in beta but i'm not asking about the beta part, more about the checkout api part
okay found how I should ask my question: is there a way to update the line items in a checkout session or do i have to create a new one?
once a Checkout Session is created, you can only update the metadata and nothing else: https://docs.stripe.com/api/checkout/sessions/update
but Custom Checkout might be different, that's why I recommend asking Stripe support direclty.