#stibbs_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1252468675173154946
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
Essentially what I need is all completed checkout sessions to have a populated:
customercustomer_email
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
if you always want a customer to be created, then pass in always for customer_creation
just so you're aware, we don't do customer deduplication, so you can end up with multiple Customers for the same email as an example
That's exactly why I'm trying to do this ๐
I'm trying to set up my app to be able to accept payments for users that haven't signed up yet
personally, I would do it differently, I would check my own DB for an existing Customer, and if I don't have one, then create a new one and pass that into the Checkout session
That's what I'm doing for the normal flow. But if they aren't logged in yet they definitely do not have a customer ID, so was exploring how to auto-create one
Seems like what I want isn't achievable?
it is possible - like i mentioned, if you always want a customer to be created, then pass in always for customer_creation
you can try it out
Oh right, I just need to add some logic to populate one or the other
I'm currently passing both and the API does not like that
Somewhat related, why does customer_email not populate for auto-created customers? Even if the email is populated under customer_details?
customer_email is for you to prepopulate - https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-customer_email
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 see that on creation, just figured on the response it might be populated. All good