Refunds

List refunds

Returns a paginated list of refunds, with optional filtering by payment, company, user, and creation date.

Required permissions:

  • payment:basic:read
get/refunds

Query parameters

afterstring

Returns the elements in the list that come after the specified cursor.

beforestring

Returns the elements in the list that come before the specified cursor.

firstinteger

Returns the first n elements from the list.

Example:42
lastinteger

Returns the last n elements from the list.

Example:42
payment_idstring

Filter refunds to those associated with this specific payment. Mutually exclusive with company_id and user_id: provide exactly one.

Example:pay_xxxxxxxxxxxxxx
company_idstring

Filter refunds to those belonging to this company. Mutually exclusive with payment_id and user_id: provide exactly one.

Example:biz_xxxxxxxxxxxxxx
user_idstring

Filter refunds to those associated with this specific user. Mutually exclusive with payment_id and company_id: provide exactly one. Requires a credential belonging to that user; any other credential receives 'You are not authorized'.

Example:user_xxxxxxxxxxxxx
direction'asc' | 'desc'

The direction of the sort.

created_beforestring date-time

Only return refunds created before this timestamp.

Example:2023-12-01T05:00:00.401Z
created_afterstring date-time

Only return refunds created after this timestamp.

Example:2023-12-01T05:00:00.401Z

Response

A successful response

Example response

{
  "data": [
    {
      "amount": 6.9,
      "created_at": "2023-12-01T05:00:00.401Z",
      "id": "rf_xxxxxxxxxxxxxxx",
      "payment": {
        "id": "pay_xxxxxxxxxxxxxx"
      },
      "provider_created_at": "2023-12-01T05:00:00.401Z",
      "reference_value": "74850120752"
    }
  ]
}

Changes