List Refunds
Retrieve a list of refunds with optional filtering.
POST
https://api.uprails.com/refunds/listReturns a list of refunds. The refunds are returned sorted by creation date, with the most recent refunds appearing first. You can filter the results by various parameters.
Pagination
Use
limit and offset parameters to paginate through large result sets. The has_more field indicates if there are more results available.Request Example
curl -X POST https://api.uprails.com/refunds/list \
-H "Content-Type: application/json" \
-H "api-key: snd_YOUR_API_KEY" \
-d '{
"limit": 10,
"offset": 0,
"status": "succeeded",
"created_gte": "2024-01-01T00:00:00Z"
}'Request Body
limitintegerdefault: 10Number of refunds to return (max: 100)
offsetintegerdefault: 0Number of refunds to skip
payment_idstringFilter refunds by payment ID
statusstringFilter refunds by status
Enum:
pendingsucceededfailedcancelledmanual_reviewcreated_gtestringFilter refunds created after this timestamp (ISO 8601)
created_ltestringFilter refunds created before this timestamp (ISO 8601)
Response
200OK
{
"data": [
{
"refund_id": "ref_1234567890abcdef",
"payment_id": "pay_abcdef1234567890",
"merchant_id": "mer_xyz789",
"status": "succeeded",
"amount": 500,
"currency": "USD",
"reason": "requested_by_customer",
"created": "2024-01-15T14:30:00Z",
"updated": "2024-01-15T14:30:05Z"
},
{
"refund_id": "ref_0987654321fedcba",
"payment_id": "pay_xyz1234567890abc",
"merchant_id": "mer_xyz789",
"status": "pending",
"amount": 1000,
"currency": "USD",
"reason": "duplicate",
"created": "2024-01-14T10:00:00Z",
"updated": "2024-01-14T10:00:00Z"
}
],
"total_count": 25,
"has_more": true
}Response Fields
| Field | Type | Description |
|---|---|---|
data | array | Array of refund objects |
total_count | integer | Total number of refunds matching the filter |
has_more | boolean | Whether there are more results available |
Filter by Payment
To get all refunds for a specific payment, use the payment_id filter:
curl -X POST https://api.uprails.com/refunds/list \
-H "Content-Type: application/json" \
-H "api-key: snd_YOUR_API_KEY" \
-d '{
"payment_id": "pay_abcdef1234567890"
}'