# Customer\_id missing on some orders while using order search

**URL:** <https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041>\
**Category:** Questions\
**Tags:** orders-api\
**Created:** [September 14, 2022, 12:21am UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041 "2022-09-14T00:21:34Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdegive](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mdegive](https://developer.squareup.com/forums/u/mdegive)\
**Post date:** [September 14, 2022, 12:21am UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/1 "2022-09-14T00:21:35Z")

</div>

This order has no customer\_id when I do order search:  
stdClass Object ( [id] =\> 6a9uibBEZlgbIHHi14L2WVk9429YY [location\_id] =\> LVPWT9XXH5FNX [line\_items] =\> Array ( [0] =\> stdClass Object ( [uid] =\> bf6f2b9b-b15c-3232-e9b2-bbc17cb6377e [catalog\_object\_id] =\> 557QGC5WG5NNW563EDAXJM2Y [catalog\_version] =\> 1661548439017 [quantity] =\> 2 [name] =\> Paella Dinner [variation\_name] =\> Regular [base\_price\_money] =\> stdClass Object ( [amount] =\> 2500 [currency] =\> USD ) [gross\_sales\_money] =\> stdClass Object ( [amount] =\> 5000 [currency] =\> USD ) [total\_tax\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [total\_discount\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [total\_money] =\> stdClass Object ( [amount] =\> 5000 [currency] =\> USD ) [variation\_total\_price\_money] =\> stdClass Object ( [amount] =\> 5000 [currency] =\> USD ) [item\_type] =\> ITEM ) ) [created\_at] =\> 2022-09-07T17:02:10.861Z [updated\_at] =\> 2022-09-07T17:02:13.000Z [state] =\> COMPLETED [version] =\> 4 [total\_tax\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [total\_discount\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [total\_tip\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [total\_money] =\> stdClass Object ( [amount] =\> 5000 [currency] =\> USD ) [closed\_at] =\> 2022-09-07T17:02:11.378Z [tenders] =\> Array ( [0] =\> stdClass Object ( [id] =\> NGgKbvobce1nwKTk8ZdtR5I2rvTZY [location\_id] =\> LVPWT9XXH5FNX [transaction\_id] =\> 6a9uibBEZlgbIHHi14L2WVk9429YY [created\_at] =\> 2022-09-07T17:02:11Z [amount\_money] =\> stdClass Object ( [amount] =\> 5000 [currency] =\> USD ) [type] =\> CASH [cash\_details] =\> stdClass Object ( [buyer\_tendered\_money] =\> stdClass Object ( [amount] =\> 5000 [currency] =\> USD ) [change\_back\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) ) [payment\_id] =\> NGgKbvobce1nwKTk8ZdtR5I2rvTZY ) ) [total\_service\_charge\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [net\_amounts] =\> stdClass Object ( [total\_money] =\> stdClass Object ( [amount] =\> 5000 [currency] =\> USD ) [tax\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [discount\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [tip\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [service\_charge\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) ) [source] =\> stdClass Object ( [name] =\> terminal ) [pricing\_options] =\> stdClass Object ( [auto\_apply\_discounts] =\> 1 ) [net\_amount\_due\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) )

Yet, when lookup the order: [Sign In](https://squareup.com/dashboard/sales/transactions/6a9uibBEZlgbIHHi14L2WVk9429YY/by-unit/LVPWT9XXH5FNX)

I see it has a name: Thomas Sadler  
 ![square_cust_missing](https://global.discourse-cdn.com/square/original/2X/5/5da1a355b16cf8ed7e96297f3b959676f65a8815.jpeg)

---

<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:** [September 14, 2022, 4:08pm UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/2 "2022-09-14T16:08:05Z")

</div>

When the payment was take with Virtual Terminal was the customer added to the sale prior to the payment? 🙂

---

<div class="post-metadata">

**Author:** ![mdegive](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mdegive](https://developer.squareup.com/forums/u/mdegive)\
**Post date:** [September 14, 2022, 11:52pm UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/3 "2022-09-14T23:52:41Z")

</div>

I am not sure. what if is wasn’t? either way, there should be a customer\_id somewhere???

---

<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:** [September 15, 2022, 3:57pm UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/4 "2022-09-15T15:57:22Z")

</div>

Currently, if the Dashboard shows a customer associated to the payment it doesn’t always mean that a `customer_id` will be in the order. If the customer is added at the time of sale it will have the `customer_id` associated to it. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team. 🙂

---

<div class="post-metadata">

**Author:** ![mdegive](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mdegive](https://developer.squareup.com/forums/u/mdegive)\
**Post date:** [September 16, 2022, 2:51pm UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/5 "2022-09-16T14:51:01Z")

</div>

Here is how they enter the sale through pos: we make the sale, charge credit, cash or check. Then screen pops up to add customer.

I need the customer info for my report how do i get it? Through the payment?

---

<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:** [September 16, 2022, 5:03pm UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/6 "2022-09-16T17:03:50Z")

</div>

If they add the customer after the payment has been completed the `customer_id` should be present in the order. If they skip that step then the `customer_id` isn’t guaranteed to be in the order. 🙂

---

<div class="post-metadata">

**Author:** ![mdegive](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mdegive](https://developer.squareup.com/forums/u/mdegive)\
**Post date:** [September 16, 2022, 8:54pm UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/7 "2022-09-16T20:54:05Z")

</div>

yes they did so why isn’t the cust-id there then?

---

<div class="post-metadata">

**Author:** ![mdegive](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mdegive](https://developer.squareup.com/forums/u/mdegive)\
**Post date:** [September 22, 2022, 3:57pm UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/8 "2022-09-22T15:57:34Z")

</div>

Any news on this? Sounds like a bug to me. Can you get this fixed?

---

<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:** [September 22, 2022, 4:22pm UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/9 "2022-09-22T16:22:33Z")

</div>

The team is looking into this. 🙂

---

<div class="post-metadata">

**Author:** ![mdegive](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mdegive](https://developer.squareup.com/forums/u/mdegive)\
**Post date:** [September 26, 2022, 4:21pm UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/10 "2022-09-26T16:21:43Z")

</div>

Any idea when this is going to be fixed? I need it ASAP for my event report! Thank you.

---

<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:** [September 26, 2022, 6:29pm UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/11 "2022-09-26T18:29:44Z")

</div>

The team confirmed that at the time of payment the customer wasn’t set in the payment request. The customer was added to the sale in the Dashboard which at this time doesn’t update the already completed order and that is why the `customer_id` isn’t showing in the order response. 🙂

---

<div class="post-metadata">

**Author:** ![mdegive](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mdegive](https://developer.squareup.com/forums/u/mdegive)\
**Post date:** [September 26, 2022, 8:15pm UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/12 "2022-09-26T20:15:07Z")

</div>

so how do I get the customer\_id?  
when I do a sales item report, it is included in the csv!

---

<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:** [September 26, 2022, 9:20pm UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/13 "2022-09-26T21:20:40Z")

</div>

At this time it’s currently not available with the API even though it’s showing in the downloaded report. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team. 🙂

---

<div class="post-metadata">

**Author:** ![mdegive](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mdegive](https://developer.squareup.com/forums/u/mdegive)\
**Post date:** [September 26, 2022, 10:00pm UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/14 "2022-09-26T22:00:46Z")

</div>

Well I need this asap, can’t you fix it? Or would it be on the payment record?

---

<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:** [September 26, 2022, 10:10pm UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/15 "2022-09-26T22:10:24Z")

</div>

It’s unfortunately not going to be on the payment record as well. We are looking to make this better in the future. At this time there isn’t a public roadmap for this feature. With Virtual Terminal all customers should be added to the sale prior to payment. Adding the customer after payment will result with no `customer_id` in the order of the payment. 🙂

---

<div class="post-metadata">

**Author:** ![mdegive](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mdegive](https://developer.squareup.com/forums/u/mdegive)\
**Post date:** [September 26, 2022, 11:14pm UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/16 "2022-09-26T23:14:00Z")

</div>

We need an event report with a list of who paid to attend the event. We have been getting this through the Sales Item report, but it takes hours to format and massage the CSV file every time we need the report for an event. So I spent hours building this report using your API, to discover that I am not getting the customer ID when the sale is done through the POS system. This is just not right. I am extremely frustrated with Square and their lack of reporting. To me this is a bug in the API and it needs to be fixed ASAP so I can get my report out. Can you please escalate this and get it fixed please?

---

<div class="post-metadata">

**Author:** ![mdegive](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mdegive](https://developer.squareup.com/forums/u/mdegive)\
**Post date:** [September 26, 2022, 11:16pm UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/17 "2022-09-26T23:16:09Z")

</div>

And by the way the POS system doesn’t ask for a customer until after the purchase!!!

---

<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:** [September 26, 2022, 11:32pm UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/18 "2022-09-26T23:32:51Z")

</div>

Currently with the POS if you add a customer after the payment before hitting new sale the `customer_id` will be included in the order. The order example that you provided was taken with [Virtual Terminal](https://squareup.com/us/en/payments/virtual-terminal) in the Seller Dashboard. With Virtual Terminal you are only given the option to add a customer before a sale. Not After. This is why there isn’t a `customer_id` in the order.

You can update the payment record in the Transactions section of the Dashboard to include a customer however it won’t add the customer to order that’s returned in the API response. This is what happened with this particular payment. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team. 🙂

---

<div class="post-metadata">

**Author:** ![mdegive](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mdegive](https://developer.squareup.com/forums/u/mdegive)\
**Post date:** [September 27, 2022, 12:02am UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/19 "2022-09-27T00:02:14Z")

</div>

But why is it in the Item Sales report then? This does not make any sense, it should not matter when the customer is added it should always be part of the order. Now go do the right thing and fix the damn bug 😉

---

<div class="post-metadata">

**Author:** ![mdegive](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mdegive](https://developer.squareup.com/forums/u/mdegive)\
**Post date:** [October 3, 2022, 11:16pm UTC](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041/20 "2022-10-03T23:16:07Z")

</div>

I haven’t heard back from you, I really need this to get fixed!  
Here is another one that does not have a customer\_id, yet it is an online order: i0apfaY9UicizhQXJBv9hdBgxMcZY

stdClass Object ( [id] =\> i0apfaY9UicizhQXJBv9hdBgxMcZY [location\_id] =\> LVPWT9XXH5FNX [line\_items] =\> Array ( [0] =\> stdClass Object ( [uid] =\> opYkcMKcyYZ15S1EatpVIC [catalog\_object\_id] =\> QGBOGCZPOEINK2FSLEGRSTIF [catalog\_version] =\> 1663799744608 [quantity] =\> 2 [name] =\> Veterans Appreciation Night - Dinner for you & guest [variation\_name] =\> [base\_price\_money] =\> stdClass Object ( [amount] =\> 1800 [currency] =\> USD ) [modifiers] =\> Array ( [0] =\> stdClass Object ( [uid] =\> 1jA3EBTmyv3dH6NbPVgEH [base\_price\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [total\_price\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [name] =\> Marine Corp [catalog\_object\_id] =\> ZFQECDLU44C6YLRLYUJ3PNAZ [catalog\_version] =\> 1663799744608 [quantity] =\> 1 ) ) [gross\_sales\_money] =\> stdClass Object ( [amount] =\> 3600 [currency] =\> USD ) [total\_tax\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [total\_discount\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [total\_money] =\> stdClass Object ( [amount] =\> 3600 [currency] =\> USD ) [variation\_total\_price\_money] =\> stdClass Object ( [amount] =\> 3600 [currency] =\> USD ) [item\_type] =\> ITEM ) ) [fulfillments] =\> Array ( [0] =\> stdClass Object ( [uid] =\> q0SJB9PTLMK0JPCvvkXCWC [type] =\> DIGITAL [state] =\> PROPOSED [line\_item\_application] =\> ALL ) ) [created\_at] =\> 2022-09-23T05:05:53.938Z [updated\_at] =\> 2022-09-23T05:05:57.000Z [state] =\> OPEN [version] =\> 4 [reference\_id] =\> 11ed3afd317d7a7aa9c1ac1f6bbbd01e [total\_tax\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [total\_discount\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [total\_tip\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [total\_money] =\> stdClass Object ( [amount] =\> 3600 [currency] =\> USD ) [tenders] =\> Array ( [0] =\> stdClass Object ( [id] =\> X3Og6gt1py9KnJ0JrUszt2DrHaJZY [location\_id] =\> LVPWT9XXH5FNX [transaction\_id] =\> i0apfaY9UicizhQXJBv9hdBgxMcZY [created\_at] =\> 2022-09-23T05:05:54Z [amount\_money] =\> stdClass Object ( [amount] =\> 3600 [currency] =\> USD ) [type] =\> CARD [card\_details] =\> stdClass Object ( [status] =\> CAPTURED [card] =\> stdClass Object ( [card\_brand] =\> VISA [last\_4] =\> 8110 [fingerprint] =\> sq-1-O3tVWxtMc2JC639hmY0oIuZD9r-qKrgy7c1-nxseT9S3F9GpQcsmIJaisFlodT71rQ ) [entry\_method] =\> KEYED ) [payment\_id] =\> X3Og6gt1py9KnJ0JrUszt2DrHaJZY ) ) [total\_service\_charge\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [net\_amounts] =\> stdClass Object ( [total\_money] =\> stdClass Object ( [amount] =\> 3600 [currency] =\> USD ) [tax\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [discount\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [tip\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) [service\_charge\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) ) [source] =\> stdClass Object ( [name] =\> Square Online ) [net\_amount\_due\_money] =\> stdClass Object ( [amount] =\> 0 [currency] =\> USD ) )

[Next page](https://developer.squareup.com/forums/t/customer-id-missing-on-some-orders-while-using-order-search/7041.md?page=2)
