#madmark_customer-duplication
1 messages ยท Page 1 of 1 (latest)
๐ 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. Thank you for your patience!
โฑ๏ธ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime! If this thread is closed and you have another question you'll need to start a new thread.
๐ 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/1213205739879923732
๐ Have more to share? You can add more detail below, including code, screenshots, videos, etc.
Hi ๐
The best practice in this case depends on the logic of your integration. If, for whatever reason, it would make sense to have separate Customer objects then you could definitely create multiple Customers with the same email.
In that case you would likely want to add some data to help your integration differentiate the objects.
But you could also implement a sort of get_or_create_customer function that first attempts to look up the Customer by email
https://docs.stripe.com/api/customers/list#list_customers-email and then, if not results are returned, creates the Customer.