--- url: https://docs.youcan.shop/youcan-pay/refunds/list.md --- # List All Refunds Returns a paginated list of refund objects related to the current authenticated account. The list is sorted, with the most recent refunds appearing first by default. **Required scope (OAuth only):** `view-refunds` ## Parameters ### Filter and Sort Refunds | Parameter | Type | Description | | --- | --- | --- | | `sort_field` | string optional | Field you want to sort by. Defaults to `created_at`. | | `sort_order` | string optional | Sorting order, `asc` or `desc`. Defaults to `desc`. | | `page` | integer optional | Page number. Defaults to `1`. | | `limit` | integer optional | Page size. Defaults to `10`, capped at `50`. | | `q` | string optional | Free-text search term. | | `filters` | array optional | An array of filter criteria where each entry has the following keys: | | `filters[].field` | string | Field you want to filter by. | | `filters[].value` | string | The value to compare by. | | `filters[].operator` | string | Comparison operator. Accepted values: `=` (default), `is`, `is_not`, `!=`, `<`, `<=`, `>`, `>=`, `in`, `like`, `not like`. | ## Returns Returns a paginated collection of refund objects. If no refunds are found, returns an empty collection. ## Request **Endpoint:** `https://youcanpay.com/api/v2/refunds` **Method:** `GET` ```bash $ curl --location -g --request GET 'https://youcanpay.com/api/v2/refunds' \ --header 'Accept: application/json' \ -u 'YOUR_PRIVATE_KEY:' ``` ### Request with Filters ```bash $ curl --location -g --request GET 'https://youcanpay.com/api/v2/refunds?sort_field=amount&sort_order=asc&filters[0][field]=amount&filters[0][value]=10000' \ --header 'Accept: application/json' \ -u 'YOUR_PRIVATE_KEY:' ``` ## Response ```json { "object": "v2.refund", "data": [ { "object": "v2.refund", "id": "83cd9f6d-481a-49c4-9cc1-954c065e6063", "transaction_id": "10e7691c-14a2-4936-833b-ec154c817ce9", "amount": { "amount": "60.00", "currency": "MAD", "localized": "MAD 60.00" }, "status": "succeeded", "is_processed": true, "reason": "duplicate", "note": null, "created_at": "2024-01-29 15:15:12" } ], "pagination": { "current_page": 1, "per_page": 10, "total": 6, "last_page": 1 } } ``` See the [Refund object](/youcan-pay/refunds/object) for a description of each field.