Learn how to retrieve payments using the Payments API.
Payments API and Refunds API

Retrieve Payments and Refunds

Regardless of the payment source (card, cash, or external payments) or what the seller used to process a payment (Square first-party products such as Point of Sale, Seller Dashboard, or a custom application that makes CreatePayment calls), Square records these payments by creating Payment objects.

All these payments can be access using the Payments API (GetPayment or ListPayments endpoint), thereby offering you an omni-channel payment experience.

The same applies to payment refunds. You can access all payment refunds using the Refunds API.

The following are example cURL commands using the Payments API and Refunds API:

  • Retrieve payments

    • GetPayment endpoint (Payments API)

      Get Payment
      • 1
      • 2
      • 3
      • 4
      curl https://connect.squareupsandbox.com/v2/payments/{payment_id} \
        -H 'Square-Version: 2022-11-16' \
        -H 'Authorization: Bearer {ACCESS_TOKEN}' \
        -H 'Content-Type: application/json'
    • ListPayments endpoint (Payments API)

      List Payments
      • 1
      • 2
      • 3
      • 4
      curl https://connect.squareupsandbox.com/v2/payments \
        -H 'Square-Version: 2022-11-16' \
        -H 'Authorization: Bearer {ACCESS_TOKEN}' \
        -H 'Content-Type: application/json'
  • Retrieve payment refunds

    • GetPaymentRefund endpoint (Refunds API)

      Get Payment Refund
      • 1
      • 2
      • 3
      • 4
      curl https://connect.squareupsandbox.com/v2/refunds/{refund_id} \
        -H 'Square-Version: 2022-11-16' \
        -H 'Authorization: Bearer {ACCESS_TOKEN}' \
        -H 'Content-Type: application/json'
    • ListPaymentRefunds endpoint (Refunds API)

      List Payment Refunds
      • 1
      • 2
      • 3
      • 4
      curl https://connect.squareupsandbox.com/v2/refunds \
        -H 'Square-Version: 2022-11-16' \
        -H 'Authorization: Bearer {ACCESS_TOKEN}' \
        -H 'Content-Type: application/json'

If you need more assistance, contact Developer Support or ask for help in the Developer Forums.