Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first.
Requiresread_financeaccess scope.
The List Refunds API retrieves a list of refunds created by the user. The refunds are returned in a sorted order, with the most recently initiated refunds appearing first.
This API is especially useful for:
- Tracking the status of initiated refunds.
- Filtering refunds by initiation timeline and their current status.
- Managing paginated refund records efficiently using a cursor-based approach.
Request Parameters
Public Request Parameters
Query Parameters
Field | Type | Required | Example | Description |
|---|---|---|---|---|
| string | No |
| Starting ID for pagination. Use the cursor from the response for subsequent pages. |
| int32 | No |
| A limit on the number of objects to be returned. Range: 1-100. Default is 10. |
| string | No |
| Filter option: Refund status: |
| string | No |
| Filter option: Refund initiation start time (in UNIX timestamp or ISO-8601 format). |
| string | No |
| Filter option: Refund initiation end time (in UNIX timestamp or ISO-8601 format). |
Response Explanation
Public Response Parameters
Successful Response
Field | Type | Example | Description |
|---|---|---|---|
| string |
| Status code for the request. |
| string |
| Additional message about the response. |
| object | Contains the refund list, pagination cursor, and metadata. | |
| boolean |
| Indicates whether more pages of refunds are available. |
| array | List of refund objects. | |
| string |
| Cursor for fetching the next page of results. |
| string |
| Unique identifier for the refund. |
| string |
| Store ID associated with the refund. |
| string |
| Currency used for the balance. |
| string |
| ID of the transaction order associated with the refund. |
| string |
| Status of the refund: |
| string |
| Refund amount. |
| string |
| Currency code of the refund (e.g., |
| string |
| Original order amount prior to the refund. |
| string |
| Refund creation timestamp (ISO-8601 format). |
| string |
| Timestamp indicating when the refund was completed (ISO-8601 format). |
Error Response
Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.
| Field | Type | Description | Example |
|---|---|---|---|
code | string | The error code indicating the type of issue. | InvalidParameter |
message | string | A detailed message describing the error. | wrong cursor |
| Field | Type | Example | Description |
|---|---|---|---|
error | String | "store is not active" | Indicates an error encountered during the process |
Error Detail
| Status Code | Message | Possible Reason | Example Response |
|---|---|---|---|
| 400 | Bad Request | Invalid input format or request structure (e.g., missing required fields or incorrect data types). | Bad Request |
| Unauthorized | The request is missing valid authentication credentials or the credentials provided are invalid. | Unauthorized | |
| 500 | InvalidParameter | cursor is not invalid | "rpc error: code = Code(400) desc = wrong cursor" |
