# 2 of 3 different customer\_id with same name and email are missing

**URL:** <https://developer.squareup.com/forums/t/2-of-3-different-customer-id-with-same-name-and-email-are-missing/8094>\
**Category:** Questions\
**Tags:** customers-api, payments-api\
**Created:** [January 3, 2023, 3:45am UTC](https://developer.squareup.com/forums/t/2-of-3-different-customer-id-with-same-name-and-email-are-missing/8094 "2023-01-03T03:45:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nabilahk11](https://avatars.discourse-cdn.com/v4/letter/n/82dd89/32.png) [@nabilahk11](https://developer.squareup.com/forums/u/nabilahk11)\
**Post date:** [January 3, 2023, 3:45am UTC](https://developer.squareup.com/forums/t/2-of-3-different-customer-id-with-same-name-and-email-are-missing/8094/1 "2023-01-03T03:45:14Z")

</div>

I have 3 orders that are paid for using the same name, email and other information, but stored in the API with a different customer\_id. Other times, 2 out of 3 customer\_id are missing from customer API. And on the dashboard, all payment history from the 2 customer\_id goes to the remaining 1 customer\_id. But when I check in the API, the payment and the order are still records from the different customer\_id. Then how do I get all the payment and order histories that have the same email but also have different customer\_id which already missing like on the dashboard?

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [January 3, 2023, 5:33pm UTC](https://developer.squareup.com/forums/t/2-of-3-different-customer-id-with-same-name-and-email-are-missing/8094/2 "2023-01-03T17:33:07Z")

</div>

That sounds like the customer profiles were merged and this is expected. You can still use `RetrieveCustomer` with the old `customer_id` and that will return the new `customer_id`. When duplicate customer profiles are identified and merged, either manually by the seller or using automated detection, the existing profiles are merged into a single profile that is assigned a new ID.

If you specify the ID of a customer profile that was deleted in a merge operation, the Customers API returns the new customer profile. For example, suppose customers A and B are merged and a new customer C is created. If you call `RetrieveCustomer` using the ID of customer A or B, the Customers API returns customer C. 🙂

---

<div class="post-metadata">

**Author:** ![nabilahk11](https://avatars.discourse-cdn.com/v4/letter/n/82dd89/32.png) [@nabilahk11](https://developer.squareup.com/forums/u/nabilahk11)\
**Post date:** [January 4, 2023, 3:02am UTC](https://developer.squareup.com/forums/t/2-of-3-different-customer-id-with-same-name-and-email-are-missing/8094/3 "2023-01-04T03:02:23Z")

</div>

I get the point. This means we have to get the old `customer_id` first, right? So we can’t group orders and invoices using `SearchOrder` and `SearchInvoice` based on `customer_id` in customer API because there is only a new `customer_id`? Or is there another way?

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [January 4, 2023, 5:08pm UTC](https://developer.squareup.com/forums/t/2-of-3-different-customer-id-with-same-name-and-email-are-missing/8094/4 "2023-01-04T17:08:05Z")

</div>

Yes, any time you don’t have a matching `customer_id` you’ll need to call the Customers API to see if that’s a merged profile. 🙂

---

<div class="post-metadata">

**Author:** ![immanuel](https://avatars.discourse-cdn.com/v4/letter/i/cab0a1/32.png) [@immanuel](https://developer.squareup.com/forums/u/immanuel)\
**Post date:** [January 4, 2023, 7:36pm UTC](https://developer.squareup.com/forums/t/2-of-3-different-customer-id-with-same-name-and-email-are-missing/8094/5 "2023-01-04T19:36:14Z")

</div>

@nabilahk11 - Could you please share the order IDs on which you are seeing this behavior? I wanted to ask if any of these orders were created through the API.

---

<div class="post-metadata">

**Author:** ![nabilahk11](https://avatars.discourse-cdn.com/v4/letter/n/82dd89/32.png) [@nabilahk11](https://developer.squareup.com/forums/u/nabilahk11)\
**Post date:** [January 6, 2023, 2:47am UTC](https://developer.squareup.com/forums/t/2-of-3-different-customer-id-with-same-name-and-email-are-missing/8094/6 "2023-01-06T02:47:43Z")

</div>

Here is the order ID:  
S7H0XyYge7qewWlVztKMxRulMYOZY  
8YHYwh7mINexWyvZdnDe54F0JsEZY  
AyZnQELPIeb31J0eIT7GqhsYCIfZY

By the way, I’ve managed to group the orders from the payment API then filtered them manually. And it works 🙂
