#deadshot7814
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- deadshot-embedded-checkout-multi-PM, 54 minutes ago, 20 messages
I am using customer_creation: "always" in setup mode in embedded checkout.
Yes, it will be a part of the Checkout Session object https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Awesome, was just going to mention that you would need to specify "always"
I get the session object and customer value is null
Is this after the checkout session is completed? I think in the newer API versions, customers aren't created until the session is completed
If so, can you send me the ID of a session that you are seeing this on?
Yes, its before the session is completed
Session ID: cs_test_c1Wu3t0jxZKY5ps1FbHxdjIosYoaBWYU1MentRTcqCCi2oLvPjDpekgWFn
Gotcha, so at this point there is no customer object assosciated with the session. The session needs to complete first
At which point the customer will be in that field in API requests or webhook events
If you want one beforehand you can create the Customer via a separate API call and then pass that ID in to the checkout session create call
Well, it will create users even if they do not complete the checkout,
Also, if I create one beforehand using separate API without specifying their name and email, and then I pass its id to session object, because it doesn't have name and email, will it save it during checkout?
I am actually not immediately sure. The server is a too busy for me to test at the moment, would you mind testing that in test mode and letting me know what you see?
Ok, I am testing
i don't know why but it got the email only, there is no name on customer
I just remembered that there is a parameter specifically for this https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer_update
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.