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

**URL:** <https://developer.squareup.com/forums/t/get-payment-s-from-an-order-to-get-card-details/7038>\
**Category:** Questions\
**Tags:** orders-api, payments-api\
**Created:** [September 13, 2022, 9:41pm UTC](https://developer.squareup.com/forums/t/get-payment-s-from-an-order-to-get-card-details/7038 "2022-09-13T21:41:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aejb](https://avatars.discourse-cdn.com/v4/letter/a/b5e925/32.png) [@aejb](https://developer.squareup.com/forums/u/aejb)\
**Post date:** [September 13, 2022, 9:41pm UTC](https://developer.squareup.com/forums/t/get-payment-s-from-an-order-to-get-card-details/7038/1 "2022-09-13T21:41:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [September 13, 2022, 10:38pm UTC](https://developer.squareup.com/forums/t/get-payment-s-from-an-order-to-get-card-details/7038/2 "2022-09-13T22:38:35Z")

</div>

The paid for order will have a `payment_id` or the `tender_id` that you can use to call [GetPayment](https://developer.squareup.com/reference/square/payments-api/get-payment) so you can get the [card\_details](https://developer.squareup.com/reference/square/objects/CardPaymentDetails). 🙂

---

<div class="post-metadata">

**Author:** ![aejb](https://avatars.discourse-cdn.com/v4/letter/a/b5e925/32.png) [@aejb](https://developer.squareup.com/forums/u/aejb)\
**Post date:** [September 13, 2022, 11:15pm UTC](https://developer.squareup.com/forums/t/get-payment-s-from-an-order-to-get-card-details/7038/3 "2022-09-13T23:15:46Z")

</div>

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