#oskarinmix_api
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/1361778011925381363
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
Checkout Sessions API does not support updating customer_email on the Checkout Session once it's been created - https://docs.stripe.com/api/checkout/sessions/update
Can you clarify what exactly you're trying to do? Are there any docs you're following for this?
i load the checkout session , and then when customer type email i want to update the email and use the same customer, but its creating a new one each time with same email
Gotcha. Unfortunately, that's not really possible.
You can set customer_creation to if_required to avoid creating new customer each time - https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-customer_creation
However, if you want to link the cus_xxx to a Checkout Session then you prob want to have your own UI that collects customer email and retrieves the object before creating the Session
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yeah i want to link to a customer, but i can not find the way when a customer change the email the checkoutSession Autoupdate again with the customer associated
We don't allow updating the email after you prefill it
Can you clarify what you mean by customer changing their email in the checkout session?
i have a checkout form where i coolect email and address , if customer change the email i can not update the email in the checkout session
You probably want to either
1/ Disable changing the email in your own form
2/ Re-create the checkout session if the customer changes their email
2 is the way, but how to recreate the checkout session, im using the checkout provider for react, and it only use the fetch function, i can not use an effect to recreate it
Does your code look something like - https://docs.stripe.com/payments/accept-a-payment?platform=web&ui=embedded-form&client=react#mount-checkout ?
If so, you could add a dependency in useCallback that re-runs the API call?