f21981db32be
Returns a list of refunds
Get all refunds.
Query parameters
A filter on the list based on the createdTime field. The value can be a string with an ISO-8601 UTC format datetime or it can be a dictionary with the following options:
- eq—return values where the createdTime field equals to this timestamp
- gt—return values where the createdTime field is after this timestamp
- gte—return values where the createdTime field is after or equal to this timestamp
- lt—return values where the createdTime field is before this timestamp
- lte—return values where the createdTime field is before or equal to this timestamp
A cursor for use in pagination. The endingBefore parameter is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with xyz your subsequent calls can include endingBefore=xyz in order to fetch the previous page of the list.
A cursor for use in pagination. The startingAfter parameter is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with xyz, your subsequent calls can include startingAfter=xyz in order to fetch the next page of the list.
A limit on the number of objects returned. Limit can range between 1 and 100, and the default is 10.
Only return objects in the given state
Only return refunds with the given IDs
The order to retrieve refunds for.
The sku to retrieve refunds for.
Retrieve refunds with this reason.
Retrieve refunds that failed for this reason.
A filter on the list based on the amount field. The value can be a string or it can be a dictionary with the following options:
- eq - return values where the amount field equals to this amount
- gt - return values where the amount field is greater than this amount
- gte - return values where the amount field is greater than or equal to this amount
- lt - return values where the amount field is less than this amount
- lte - return values where the amount field is less than or equal to this amount
A filter on the list based on the amount field. The value can be a string or it can be a dictionary with the following options:
- eq - return values where the amount field equals to this amount
- gt - return values where the amount field is greater than this amount
- gte - return values where the amount field is greater than or equal to this amount
- lt - return values where the amount field is less than this amount
- lte - return values where the amount field is less than or equal to this amount
Response
200 OK
Example response
{
"hasMore": true,
"data": [
{
"id": "ref_5823594809",
"createdTime": "2018-04-25T20:36:00Z",
"orderId": "ord_6645940010",
"invoiceId": "5823594809",
"currency": "USD",
"type": "shipping",
"amount": 9.99,
"refundedAmount": 9.99,
"items": [
{
"type": "tax",
"skuId": "sku_5823594809",
"quantity": 1,
"amount": 5.95,
"percent": 10
}
],
"reason": "requested_by_customer",
"failureReason": "expired_or_canceled_card",
"state": "created",
"tokenInformation": {
"token": "bb3f0f17-567a-4c87-8cbd-76d93a750709",
"expiresTime": "2019-12-25T20:36:00Z"
},
"expiresTime": "2019-12-25T20:36:00Z",
"charges": [
{
"id": "c5b02ace-115d-4433-8841-8165d4c927a8",
"refunds": [
{
"createdTime": "2018-04-25T20:36:00Z",
"amount": 42.95,
"state": "complete"
}
],
"sourceId": "376e6777-d92b-4d35-a460-44f29327a18e"
}
],
"source": "string",
"metadata": {
"coupon": "iOS"
}
}
]
}