#stibbs_api

1 messages ยท Page 1 of 1 (latest)

proud oceanBOT
#

๐Ÿ‘‹ 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.

median hearth
#

Essentially what I need is all completed checkout sessions to have a populated:

  • customer
  • customer_email
pliant stump
#

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

median hearth
#

I'm trying to set up my app to be able to accept payments for users that haven't signed up yet

pliant stump
#

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

median hearth
#

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?

pliant stump
#

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

median hearth
#

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?

pliant stump
median hearth
#

Yeah I see that on creation, just figured on the response it might be populated. All good