> ## Documentation Index
> Fetch the complete documentation index at: https://alguna.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Refund

Retrieve a refund by its ID.

<ParamField path="id" type="string" required>
  The refund ID.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.alguna.io/refunds/ref_abc123 \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const refund = await alguna.refunds.get('ref_abc123');
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "id": "ref_abc123",
    "amount": "99.00",
    "status": "succeeded",
    "currency": "USD",
    "accountId": "acc_xyz789",
    "paymentId": "pay_def456",
    "reason": "Customer requested refund",
    "failureReason": null,
    "processorId": "re_stripe_123",
    "externalId": "re_1234567890",
    "externalUrl": "https://dashboard.stripe.com/refunds/re_1234567890",
    "createdAt": "2024-01-20T10:00:00Z",
    "updatedAt": "2024-01-20T10:05:00Z"
  }
  ```
</ResponseExample>

<ResponseField name="id" type="string">
  Unique identifier for the refund.
</ResponseField>

<ResponseField name="amount" type="string">
  Refund amount as a decimal string.
</ResponseField>

<ResponseField name="status" type="string">
  Refund status: `pending`, `processing`, `succeeded`, `failed`, or `canceled`.
</ResponseField>

<ResponseField name="currency" type="string">
  Currency code.
</ResponseField>

<ResponseField name="accountId" type="string">
  The account that received the refund.
</ResponseField>

<ResponseField name="paymentId" type="string">
  The original payment that was refunded.
</ResponseField>

<ResponseField name="reason" type="string">
  Reason for the refund.
</ResponseField>

<ResponseField name="failureReason" type="string">
  Reason for failure if status is `failed`.
</ResponseField>

<ResponseField name="processorId" type="string">
  Payment processor's internal refund ID.
</ResponseField>

<ResponseField name="externalId" type="string">
  External reference ID from the payment processor.
</ResponseField>

<ResponseField name="externalUrl" type="string">
  Link to view the refund in the payment processor's dashboard.
</ResponseField>

<ResponseField name="createdAt" type="string">
  ISO 8601 timestamp of creation.
</ResponseField>

<ResponseField name="updatedAt" type="string">
  ISO 8601 timestamp of last update.
</ResponseField>
