0

I am using v2 of the connect api to list transactions for a specific date range. All of the transactions that I get back never have the customer_id populated in any of the Tender objects even though I know some customers are known by square. I am able to successfully retrieve all of the other data. The resource I am using is locations/{location_id}/transactions and specifying the begin_time and end_time in the query string . What am I missing?

Edit

I downloaded my transactions using the export function and none of the transactions have a customer name or Id. What is required to have this information populated? Maybe that is where I am going wrong. Does this have to be a customer I add myself or does it include customers added by Square? Is it required the customer to have their receipt sent to them by email?

3 Answers3

2

I recently figured out how to retrieve customer information, I recorded it here: Access customer information using Square Connect API

Assuming that you've actually recorded a customer on the sale, the customer_id should be present on each of your tenders...

Issue the v2 request for the Customer identified on the Payment tender(s). If there are multiple tenders the customerId should be the same for each. /v2/customers/{transaction.tenders[0].customer_id}

Note: I also reported a similar issue: customer_id is not populated on transaction tender and for a few days Square acknowleged in the comments that there were going to fix it. Then they seemingly deleted the comment from SO. As of testing I was doing last night, all transactions had the customer_id populated in real time.

Good Luck!

Community
  • 1
  • 1
Nate Good
  • 439
  • 4
  • 11
  • I am still not able to pull any customer ids from the transaction even if I pull in the transaction directly by transaction id. How do I verify that the transaction I am pulling back should have customer id on there? Maybe I need to start there. – Jonathan Meuth Jun 22 '16 at 17:49
  • You have to add the customer to the sale, this may help: https://squareup.com/help/us/en/article/5532-manage-your-customer-directory-from-the-square-app – Nate Good Jun 23 '16 at 03:19
  • This comment helped. I added a customer manually and associated them with a sale and I was able to see it when i requested the transaction. Thanks. – Jonathan Meuth Jun 25 '16 at 03:58
0

Did you specify the customer_id field in the charge request? The customer ID should be returned in the transaction object if the association is specified at charge time.

J. Zhao
  • 106
  • 1
  • I am using Square Register to charge customers. My understanding is that Square Register would associate a transaction for a customer if either they use a credit card or they enter their email address in at the end of the transaction, but that does not seem to be happening. – Jonathan Meuth Jun 25 '16 at 03:25
0

You have to enable customer management for the merchant, add then add a customer to the sale.

This may help: https://squareup.com/help/us/en/article/5532-manage-your-customer-directory-from-the-square-app

Nate Good
  • 439
  • 4
  • 11