Transaction data

Hi there,

I’m having difficulty in locating the transaction information from a sale that is made on a point of sale. Is there an API that will allow us to pull the total amount paid on a transaction in a store that uses the pos.

The Payments API will get you totals of every payment made. If you need any further information (such as what items were bought), you’ll need to rely on the Orders API instead.

Thanks for the response.

If the transaction is added to a customer. Can I get that customer information from the payment? Such as customer ID?

I am having difficulty in finding data on the total transaction that is linked to the customer.

I should add for further background.

We have created a program that is similar to the loyalty (we are based in the UK and square doesn’t provide this)

We have managed to get data of all orders made via our website. But having difficulty in getting the same data through the POS. If we add a transaction to a customer’s profile. Where would we get this transaction info?

It depends on how the payment is being created. I believe if they’re going through Square POS, then customer_id will be a part of the Order, rather than the Payment (however, to be clear, a customer_id can exist on both objects).

Thanks for the explanation that really helps.

Would this work with any of webhooks also?

Unfortunately order webhooks do not fire with POS transactions. You could listen to the payment.created webhook which would fire when the payment completes, but you may need to retrieve the order_id from the payment webhook, and then retrieve the order using the Orders API to get the customer_id.

So we are doing this and it’s working for orders created on the site but any transactions made on the POS are not pulling through.

Can you clarify what you mean by not pulling through? So you’re not receiving a payment.created webhook for POS payments? Can you share an example payment_id?