List Refunds

🔒

Requires read_finance access 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:

  1. Tracking the status of initiated refunds.
  2. Filtering refunds by initiation timeline and their current status.
  3. Managing paginated refund records efficiently using a cursor-based approach.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Query Parameters

FieldTypeRequiredExampleDescription
cursorstringNoabc123Starting ID for pagination. Use the cursor from the response for subsequent pages.
limitint32No10A limit on the number of objects to be returned. Range: 1-100. Default is 10.
statusstringNosucceededFilter option: Refund status:
succeeded: The refund was successfully processed.
failed: The refund attempt failed, and no funds were returned.
processing: The refund is currently being processed, with final results pending.
created_at_minstringNo2024-04-01T00:00:00ZFilter option: Refund initiation start time (in UNIX timestamp or ISO-8601 format).
created_at_maxstringNo2024-04-30T23:59:59ZFilter option: Refund initiation end time (in UNIX timestamp or ISO-8601 format).

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Successful Response

FieldTypeExampleDescription
codestring"Success"Status code for the request.
messagestring"Request completed"Additional message about the response.
dataobjectContains the refund list, pagination cursor, and metadata.
data.has_morebooleantrueIndicates whether more pages of refunds are available.
data.listarrayList of refund objects.
data.cursorstring"abc123"Cursor for fetching the next page of results.
data.list[].idstring"123456"Unique identifier for the refund.
data.list[].store_idstring"store123"Store ID associated with the refund.
data.list[].balance_currencystring"USD"Currency used for the balance.
data.list[].transaction_order_idstring"trans123"ID of the transaction order associated with the refund.
data.list[].statusstring"succeeded"Status of the refund:
succeeded: Refund successfully processed.
failed: Refund failed.
processing: Refund is pending processing.
data.list[].amountstring"50.00"Refund amount.
data.list[].currencystring"USD"Currency code of the refund (e.g., USD).
data.list[].original_order_amountstring"100.00"Original order amount prior to the refund.
data.list[].created_atstring"2024-04-28T06:50:19Z"Refund creation timestamp (ISO-8601 format).
data.list[].completed_atstring"2024-04-28T06:52:36Z"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.

FieldTypeDescriptionExample
codestringThe error code indicating the type of issue.InvalidParameter
messagestringA detailed message describing the error.wrong cursor
FieldTypeExampleDescription
errorString "store is not active"Indicates an error encountered during the process

Error Detail

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized
500InvalidParametercursor is not invalid"rpc error: code = Code(400) desc = wrong cursor"

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!