List payment 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_
|
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_
|
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_
|
The order in which results are listed:
|
cursor
|
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_
|
Limit results to the location supplied. By default, results are returned for all locations associated with the seller. |
status
|
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_
|
If provided, only returns refunds whose payments have the indicated source type.
Current values include Default: If omitted, refunds are returned regardless of the source type. |
limit
|
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
|
Information about errors encountered during the request. |
refunds
|
The list of requested refunds. |
cursor
|
The pagination cursor to be used in a subsequent request. If empty, this is the final response. For more information, see Pagination. |
Examples
- cURL
- Ruby
- Python
- C#
- Java
- PHP
- Node.js
curl https://connect.squareup.com/v2/refunds \
-H 'Square-Version: 2022-06-16' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json'
{
"refunds": [
{
"id": "bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY_69MmgHubkLqx9wGhnmenRUHOaKitE6llfZuxcWYjGxd",
"status": "COMPLETED",
"amount_money": {
"amount": 555,
"currency": "USD"
},
"payment_id": "bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY",
"order_id": "9ltv0bx5PuvGXUYHYHxYSKEqC3IZY",
"created_at": "2021-10-13T19:59:05.342Z",
"updated_at": "2021-10-13T20:00:03.497Z",
"processing_fee": [
{
"effective_at": "2021-10-13T21:34:35.000Z",
"type": "INITIAL",
"amount_money": {
"amount": -34,
"currency": "USD"
}
}
],
"location_id": "L88917AVBK2S5",
"reason": "Example Refund"
}
],
"cursor": "5evquW1YswHoT4EoyUhzMmTsCnsSXBU9U0WJ4FU4623nrMQcocH0RGU6Up1YkwfiMcF59ood58EBTEGgzMTGHQJpocic7ExOL0NtrTXCeWcv0UJIJNk8eXb"
}