Get payment(s) from an order to get card details

Hi, we’re currently using the checkout link API to create a checkout link with an order. We then redirect to the Square checkout link where the user will complete the payment then be redirected back.

We can get the order back and check the state is COMPLETED or netAmountDueMoney is 0 to check if it’s been paid but we are also trying to get the payment card details used during the checkout (cardBrand and last4) for our custom receipts.

Is there any way to get the payment(s)/payment id used to complete the order so we can look this up using the payments api? Or any other way to get the card info?

Thanks

The paid for order will have a payment_id or the tender_id that you can use to call GetPayment so you can get the card_details. :slightly_smiling_face:

Ah perfect thanks, this is exactly what I was looking for!