Cash Refunds when using square reader

Hello! I’m trying to setup some refund logic in a project our company owns. I noticed that the Refund V2 API requires a payment_id. I’ve also noticed that the Square Reader talks to the deprecated Transaction API. This is fine for card payments since it seems like the payment_id is essentially the tender_id in the tenders field.

However, if you take a cash payment with the reader, you aren’t given a transaction_id or tender_id. So how are you supposed to refund a cash payment that was taken from the Square Reader? Or should we be handling Cash payments differently with the reader?

With cash payments and Reader SDK you can use the Orders API to RetrieveOrder. The transaction_id is the same as the order_id. Once you have the order you can get the tender_id of the order to pass to RefundPayment. :slightly_smiling_face:

Cash payments do not give a transaction_id, just a transaction_client_id.

Yes, you’re right. You’ll need to to reconcile transactions that do not have card tenders, with transactionClientID to match client-generated transactions to the client_id field in transactions returned by the ListTransactions endpoint of the Transactions API. Then you can call the Orders API with the transaction_id to get the tender_id associated to the payment. :slightly_smiling_face:

I’ll give it a try tomorrow and let you know how it goes.

In the mean time, is there a reason why the Reader is using the deprecated Transaction API? Will it be migrated over to using the Payment V2 API?

Sounds good! When Reader SDK was launched the main API for taking a payment was the Transactions API. Payments API hadn’t been launched yet. Yes, improvements will be made to migrate over. :slightly_smiling_face:

1 Like

Okay. That did work but it’s convoluted in trying to just get the payment_id. I assume you’re not allowed to tell me but I’m going to ask anyways, any timeline on when the reader will be migrated over to Payments API?

Glad to hear it worked. Unfortunately, we don’t have a public timeline when it will be migrated. :slightly_smiling_face:

I noticed that Cash Transactions now have both the tender id and transaction_id on them when I query ListTransactions. At least the ones in the last day. Did something change?

I don’t know of any changes. With the Transactions API cash payments have always had the transaction_id and a tender_id.