• 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.

Max results per page: 100


Permissions
PAYMENTS_READ
Try in API Explorer
Name Description
begin_time
string

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:27.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

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

Default: The current time.

Examples for January 25th, 2020 6:27.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 to retrieve the next set of results for the original query.

See Pagination for more information.

location_id
string

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

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 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 payment source.

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

Response Fields

Name Description
errors
Error [ ]

Information on 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.

See Pagination for more information.

Examples

You are viewing an old version of the API
GET /v2/refunds
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
curl https://connect.squareup.com/v2/refunds \
  -H 'Square-Version: 2020-08-12' \
  -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?