Uprails
Refunds/List

List Refunds

Retrieve a list of refunds with optional filtering.

POSThttps://api.uprails.com/refunds/list

Returns 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: 10

Number of refunds to return (max: 100)

offsetintegerdefault: 0

Number of refunds to skip

payment_idstring

Filter refunds by payment ID

statusstring

Filter refunds by status

Enum:pendingsucceededfailedcancelledmanual_review
created_gtestring

Filter refunds created after this timestamp (ISO 8601)

created_ltestring

Filter 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

FieldTypeDescription
dataarrayArray of refund objects
total_countintegerTotal number of refunds matching the filter
has_morebooleanWhether 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"
  }'