Customer Not Found Weirdness

In my database I use the customer API to create and save the squareid for every ‘customer’ associated with the business. Most are actual paying customers, some are potential customers I create based on email, etc.

I use the card sdk and card API to create and update customer credit cards for online purchases.

Recently a customer contacted me when she couldn’t update her card. I looked into my reporting and saw a ‘customer not found’ error. I thought my code was bad, and started debugging.

What I found using the API explorer:
Trying to create a card based on my record of her square ID – customer not found.
Tried to retrieve customer based recorded square ID – customer not found
Retrieved existing card using API – copied customer ID as shown
Tried to retrieve customer based on copied Square ID – customer not found.

I have now checked all 497 customer records in my database
17 have ‘Customer ID Not Found’ failures. (My own customer ID failed!)

8 of these customers have cards
I checked those cards with API explorer

2 cards have the same square id I recorded in the database
6 cards returned different customer ids

In all these cases, the ‘retrieve customer’ failed, using the customerid show in the card record

I can send a spreadsheet of problem customer and associated card IDs

Suggestions?

:waving_hand: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Customers API
Customer APIs: Securely Manage Customer Data
Cards API

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

What are the customer_ids your seeing this behavior with? Also what is the card_ids that have the customer_ids associated to them? :slight_smile:

Should I send spreadsheet of id info to [email protected] (address of your response email? Or some other way?

If you could post a few of them that would be great. All the values are safe to share publicly. The only value you should never share is the access token as they are secret. :slight_smile:

Cards with Square ID not found Square ID used to create card Square ID shown in retrieved card Column 4
ccof:CA4SEDs23s2799UMjgY3oDteLx0oAQ Y75JPFNGN4TMZDRCMJM2GT2MJW same
ccof:IGXNUXPr0lF9OHES3GB Y0JQM0ZFTDBSJ2CS6FSKPWNFM4 C4CM3P4GK8TDQ77TKKMY41M66W
ccof:YcYGqhWUpqjUVZwp4GB C35Y6WA2G54EZ3EDNWK8WESEVM 1321R9EACN6NV6YZMQBFXCMKHW
ccof:CA4SEKsl4H9p8Th0CCmhAOo9EpUoAg MQTM8DJGN5NH79HWZYSJZBP8CW same
ccof:CA4SEEZngAPCJ4d_rrtmLDfE6c0oAg C4CM3P4GK8TDQ77TKKMY41M66W 640CBRHV71X57KHHNSEC6V2Q5R
ccof:CBESEB08Rc7hogF_qvdJXkOjOt4 69CY66M32WXJK2DJVTX4KXPQE0 2N7FKEFY4FRGTX8MTF8YZTGH6W

Thanks, the team is looking into this. :slight_smile:

The team got back to me and saw that the following tokens were directly deleted in dashboard and the initiator was the owner

  • Y75JPFNGN4TMZDRCMJM2GT2MJW
  • C35Y6WA2G54EZ3EDNWK8WESEVM
  • MQTM8DJGN5NH79HWZYSJZBP8CW
  • C4CM3P4GK8TDQ77TKKMY41M66W

69CY66M32WXJK2DJVTX4KXPQE0 was manually merged by the owner and became the contact 1321R9EACN6NV6YZMQBFXCMKHW which was then deleted by the same person.Y75JPFNGN4TMZDRCMJM2GT2MJW was automerged into 301TMH9C751KH40014DZ51YD7G which then became 18WVV7QDH15AF6E1K3EKHRQTZ8, and 18WVV7QDH15AF6E1K3EKHRQTZ8 was deleted by the owner. :slight_smile:

Thanks. Those darned owners!!