#oskarinmix_api

1 messages ¡ Page 1 of 1 (latest)

feral ironBOT
#

👋 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.

steady siren
#

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?

elfin steppe
#

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

steady siren
#

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

elfin steppe
#

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

steady siren
#

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?

elfin steppe
#

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

steady siren
#

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

elfin steppe
#

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

steady siren