v1

latestOpenAPI 3.0.0Apache 2.02026-07-143281,4552.1 MB
Refunds

ListPaymentRefunds

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.

get/v2/refunds

Query parameters

begin_timestring

Indicates the start of the time range to retrieve each PaymentRefund for, in RFC 3339 format. The range is determined using the created_at field for each PaymentRefund.

Default: The current time minus one year.

end_timestring

Indicates the end of the time range to retrieve each PaymentRefund for, in RFC 3339 format. The range is determined using the created_at field for each PaymentRefund.

Default: The current time.

sort_orderstring

The order in which results are listed by PaymentRefund.created_at:

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

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_idstring

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

statusstring

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_typestring

If provided, only returns refunds whose payments have the indicated source type. Current values include CARD, BANK_ACCOUNT, WALLET, CASH, and EXTERNAL. For information about these payment source types, see Take Payments.

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

limitinteger

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

updated_at_begin_timestring

Indicates the start of the time range to retrieve each PaymentRefund for, in RFC 3339 format. The range is determined using the updated_at field for each PaymentRefund.

Default: If omitted, the time range starts at begin_time.

updated_at_end_timestring

Indicates the end of the time range to retrieve each PaymentRefund for, in RFC 3339 format. The range is determined using the updated_at field for each PaymentRefund.

Default: The current time.

sort_field'CREATED_AT' | 'UPDATED_AT'

The field used to sort results by. The default is CREATED_AT.

Response

Success

cursorstring

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

For more information, see Pagination.

Example response

{
  "cursor": "5evquW1YswHoT4EoyUhzMmTsCnsSXBU9U0WJ4FU4623nrMQcocH0RGU6Up1YkwfiMcF59ood58EBTEGgzMTGHQJpocic7ExOL0NtrTXCeWcv0UJIJNk8eXb",
  "refunds": [
    {
      "amount_money": {
        "amount": 555,
        "currency": "USD"
      },
      "created_at": "2021-10-13T19:59:05.342Z",
      "id": "bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY_69MmgHubkLqx9wGhnmenRUHOaKitE6llfZuxcWYjGxd",
      "location_id": "L88917AVBK2S5",
      "order_id": "9ltv0bx5PuvGXUYHYHxYSKEqC3IZY",
      "payment_id": "bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY",
      "processing_fee": [
        {
          "amount_money": {
            "amount": -34,
            "currency": "USD"
          },
          "effective_at": "2021-10-13T21:34:35.000Z",
          "type": "INITIAL"
        }
      ],
      "reason": "Example Refund",
      "status": "COMPLETED",
      "updated_at": "2021-10-13T20:00:03.497Z"
    }
  ]
}