#mrobjectoriented_api
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.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1262383215914516491
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
hello!
the request you shared is indeed updating an existing customer with a new email address
hmm so why do I see two entries when I search for the customer name?
before updating, I only see one
what are the two customers you see? can you share their ID?
yes one sec
cus_QSJFpn7zN44M6Q
cus_QKoauGUEPLg8jj
hmmmm, I think the email I changed it to, there was already an existing customer with that email
does that have to do with why I see two entries?
looks like it. one was created this month, the other last month.
but these customers seemt o be using different emails?
where exactly do you see the two customers? in the Stripe dashboard?
after you searched for the email?
I search for the customer name
so what I want is
when I search for the customer name, that customer to popup
in this case, the customer I wanted to update was called Hozier
it had an email email1
I updated it to email2
turns out email2 already existed on Stripe as a separate customer
now what has happened instead is that both cus 1 & 2 have the name Hozier
well they have the same name, so it's expected that you see the two customers when searching for their name
I see, so basically email is kind of an identifier in Stripe?
its not as if it is just another field in the customer object
emails are supposed to be singleton
thats why when I update it to something which already exists, it will first search if there is a customer already
and it basically updated the name of email2 to match Hozier
I'm confused. you can create as many Customers as you'd like in Stripe, with zero restrictions on their name and/or email. like you could have 300 Customers obejcts all with the same name and email and it will work
so here's the thing, I will explain again
there are two customers - 1 and 2
customer 1's name is Hozier
customer 2 - Idk, not relevant (but not Hozier)
customer1 has email id email1 and customer2 has email id email2
I update customer-1's email to email2
now there are two accounts with their email as email2 (atleast what I expect)
now I search for customers with name Hozier again
I see two customers
why?
earlier there was only one
cus_QSJFpn7zN44M6Q has it's name set to Hozier here: https://dashboard.stripe.com/test/logs/req_UIDqvxkvcYNhHO
cus_QKoauGUEPLg8jj has it's name set to Hozier here: https://dashboard.stripe.com/test/logs/req_9PaJj2l7fZsfJq
it's your code who sets the name of these two customers.
if that's not expected, you need to review your code.
happy to help ๐
it depends, but after ~20 minutes of inactivity we usually close a thread