#ronman - Checkout
1 messages · Page 1 of 1 (latest)
Hello! You can set the customer property to the ID of an existing Customer when creating a Checkout Session: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer
Ah, I've seen that before but spaced it. Suggestion: since the docs suggest always doing this, put it more prominently in the instructions, as opposed to just in the API docs. Will try this, should work, I'll be back if any problems. Thanks.
Well, it won't allow me to set both customer_email and customer when creating a Checkout session. So I put customer in the metadata. Which comes back correctly in my webhook, but meanwhile the session has created its own new customer ID, so they're out of sync. Is there some best practice when you want to sync up using CustomerID and also send email as part of a new session? Or is that overkill?
If you're specifying an existing Customer the email set on that Customer will be used. Why do you want to specify customer_email in addition to that?
To prevent them from entering a different email in the Checkout form, i.e. prefill the email entry.
There's no way to prevent them from changing the email address in Checkout currently (although it's being worked on as a future feature).
oh
So, if they enter a different email in Checkout, does that alter the original Customer email I associated when creating that Customer (and thus becoming out of sync with the email I use to identify them in my app)?
If the customer changes their email on the Checkout page, the Customer object will be updated with the new email.
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer
But we're working on making this read-only when it's "pre-filled"