Uprails
Refunds/Retrieve

Retrieve Refund

Retrieve the details of an existing refund.

GEThttps://api.uprails.com/refunds/:refund_id

Retrieves a refund by its ID. Returns the refund object with current status and all associated details.

Path Parameters

ParameterTypeDescription
refund_idstringRequired. The ID of the refund to retrieve.

Request Example

curl https://api.uprails.com/refunds/ref_1234567890abcdef \
  -H "api-key: snd_YOUR_API_KEY"

Response

200OK
{
  "refund_id": "ref_1234567890abcdef",
  "payment_id": "pay_abcdef1234567890",
  "merchant_id": "mer_xyz789",
  "status": "succeeded",
  "amount": 500,
  "currency": "USD",
  "reason": "requested_by_customer",
  "metadata": {
    "order_id": "12345"
  },
  "created": "2024-01-15T14:30:00Z",
  "updated": "2024-01-15T14:30:05Z"
}

Response Fields

FieldTypeDescription
refund_idstringUnique identifier for the refund
payment_idstringID of the payment that was refunded
statusstringCurrent status of the refund
amountintegerAmount refunded in smallest currency unit
currencystringThree-letter ISO currency code
reasonstringReason for the refund
createdstringTimestamp when the refund was created
updatedstringTimestamp when the refund was last updated