• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
List payment refunds

GET /v2/refunds

Retrieves a list of refunds for the account making the request.

Results are eventually consistent, and new refunds or changes to refunds might take several seconds to appear.

The maximum results per page is 100.

Name Description
begin_time
string

The timestamp for the beginning of the requested reporting period, in RFC 3339 format.

Default: The current time minus one year.

Examples for January 25th, 2020 6:25:34pm Pacific Standard Time:

UTC: 2020-01-26T02:25:34Z

Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00

end_time
string

The timestamp for the end of the requested reporting period, in RFC 3339 format.

Default: The current time.

Examples for January 25th, 2020 6:25:34pm Pacific Standard Time:

UTC: 2020-01-26T02:25:34Z

Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00

sort_order
string

The order in which results are listed:

  • ASC - Oldest to newest.
  • DESC - Newest to oldest (default).
cursor
string

A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for the original query.

For more information, see Pagination.

location_id
string

Limit results to the location supplied. By default, results are returned for all locations associated with the seller.

status
string

If provided, only refunds with the given status are returned. For a list of refund status values, see PaymentRefund.

Default: If omitted, refunds are returned regardless of their status.

source_type
string

If provided, only refunds with the given source type are returned.

  • CARD - List refunds only for payments where CARD was specified as the payment source.

Default: If omitted, refunds are returned regardless of the source type.

limit
integer (32-bit)

The maximum number of results to be returned in a single page.

It is possible to receive fewer results than the specified limit on a given page.

If the supplied value is greater than 100, no more than 100 results are returned.

Default: 100

Response Fields

Name Description
errors
Error [ ]

Information about errors encountered during the request.

refunds
PaymentRefund [ ]

The list of requested refunds.

cursor
string

The pagination cursor to be used in a subsequent request. If empty, this is the final response.

For more information, see Pagination.

Examples

You are viewing an old version of the API
GET /v2/refunds
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/refunds \
  -H 'Square-Version: 2021-05-13' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
Response JSON
{
  "refunds": [
    {
      "id": "O2QAAhTYs7rUfzlxT38GMO7LvaB_q7JwCHtxmgXrh8fAhV468WQ44VxDtL7CU4yVRlsbXmI",
      "created_at": "2019-07-06T18:01:22.335Z",
      "updated_at": "2019-07-06T18:06:04.653Z",
      "status": "COMPLETED",
      "amount_money": {
        "amount": 1000,
        "currency": "USD"
      },
      "payment_id": "O2QAAhTYs7rUfzlxT38GMO7LvaB",
      "order_id": "2duiyoqbfeXY0DBi15GEyk5Epa4F",
      "location_id": "XK3DBG77NJBFX",
      "processing_fee": [
        {
          "effective_at": "2019-07-06T20:01:12.000Z",
          "type": "INITIAL",
          "amount_money": {
            "amount": -59,
            "currency": "USD"
          }
        }
      ]
    },
    {
      "id": "8TDIQvFw8PeDIxhSfd5yyX7GuaB_13px5Vrz01qzzuoGzmjsZIxDjfHhbkm2XppBUX1dW7I",
      "created_at": "2019-07-06T17:01:54.232Z",
      "updated_at": "2019-07-06T17:21:04.684Z",
      "status": "COMPLETED",
      "amount_money": {
        "amount": 1000,
        "currency": "USD"
      },
      "payment_id": "8TDIQvFw8PeDIxhSfd5yyX7GuaB",
      "order_id": "w6EXfEwS03oTQsnZTCqfE6f67e4F",
      "processing_fee": [
        {
          "effective_at": "2019-07-06T19:01:45.000Z",
          "type": "INITIAL",
          "amount_money": {
            "amount": -59,
            "currency": "USD"
          }
        }
      ],
      "location_id": "XK3DBG77NJBFX"
    }
  ],
  "cursor": "5evquW1YswHoT4EoyUhzMmTsCnsSXBU9U0WJ4FU4623nrMQcocH0RGU6Up1YkwfiMcF59ood58EBTEGgzMTGHQJpocic7ExOL0NtrTXCeWcv0UJIJNk8eXb"
}

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?