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

# Retrieve a refund

> This endpoint allows you to retrieve the details of a specific refund.

Retrieves the details of a refund using its unique ID.

## Path Parameters

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

## Response

<ResponseField name="id" type="number">
  The unique refund ID
</ResponseField>

<ResponseField name="status" type="string">
  The current status of the refund. Possible values: `created`, `pending`, `pending_manual`, `successful`, `failed`
</ResponseField>

<ResponseField name="transactionId" type="string">
  The original transfer ID that is being refunded
</ResponseField>

<ResponseField name="amount" type="number">
  The refund amount (same as original transfer)
</ResponseField>

<ResponseField name="currency" type="string">
  The currency of the refund (e.g., `XOF`, `USD`)
</ResponseField>

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

<ResponseField name="paymentMethod" type="string">
  The payment method used for the refund. Possible values: `mobile_money`, `bank_transfer`
</ResponseField>

<ResponseField name="fallbackAllowed" type="boolean">
  Whether fallback methods are allowed for this refund
</ResponseField>

<ResponseField name="fallbackUsed" type="boolean">
  Whether a fallback method was used for this refund
</ResponseField>

<ResponseField name="metadata" type="object">
  Additional metadata associated with the refund
</ResponseField>

<ResponseField name="zendeskTicketId" type="string">
  The Zendesk ticket ID associated with the refund
</ResponseField>

<ResponseField name="createdAt" type="string">
  The date and time when the refund was created
</ResponseField>

<ResponseField name="updatedAt" type="string">
  The date and time when the refund was last updated
</ResponseField>

<RequestExample>
  ```bash Example Request theme={null}
  curl --location --request GET 'https://api.hub2.io/refunds/123' \
  --header 'ApiKey: [REDACTED]' \
  --header 'MerchantId: [REDACTED]' \
  --header 'Environment: sandbox' \
  --header 'Content-Type: application/json'
  ```

  ```typescript Typescript theme={null}
  import fetch from 'node-fetch';

  async function getRefund() {
      const response = await fetch('https://api.hub2.io/refunds/123', {
          method: 'GET',
          headers: {
              'ApiKey': '[REDACTED]',
              'MerchantId': '[REDACTED]',
              'Environment': 'sandbox',
              'Content-Type': 'application/json'
          }
      });

      if (response.ok) {
          const refund = await response.json();
          console.log(refund);
      } else {
          console.log(`HTTP Status: ${response.status}`);
      }
  }

  getRefund();
  ```

  ```python Python theme={null}
  import requests

  headers = {
      'ApiKey': '[REDACTED]',
      'MerchantId': '[REDACTED]',
      'Environment': 'sandbox',
      'Content-Type': 'application/json',
  }

  response = requests.get(
      'https://api.hub2.io/refunds/123',
      headers=headers
  )

  if response.status_code == 200:
      print(response.json())
  else:
      print(f'HTTP Status: {response.status_code}')
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": 123,
    "status": "successful",
    "transactionId": "tr_000000000000000000011",
    "amount": 2000,
    "currency": "XOF",
    "reason": "Customer requested refund",
    "paymentMethod": "mobile_money",
    "fallbackAllowed": true,
    "fallbackUsed": false,
    "metadata": {},
    "zendeskTicketId": "zd_123456",
    "createdAt": "2023-01-01T12:00:00.000Z",
    "updatedAt": "2023-01-01T12:30:00.000Z"
  }
  ```
</ResponseExample>
