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

# Request Refund

> Request a refund for an account

## Endpoint

```
POST https://api.ugc.inc/billing/request-refund
```

## Overview

Request a refund for an account. All refund requests require manual admin review.

## Request Body

<ParamField body="account_id" type="string" required>
  ID of the account for the refund request
</ParamField>

<ParamField body="reason" type="string">
  Reason for requesting a refund
</ParamField>

## Response

<ResponseField name="data" type="object">
  <Expandable title="Response properties">
    <ResponseField name="message" type="string">
      Confirmation message
    </ResponseField>

    <ResponseField name="request" type="object | null">
      The billing request record

      <Expandable title="Request properties">
        <ResponseField name="id" type="string">
          Request ID
        </ResponseField>

        <ResponseField name="type" type="'refund'">
          Request type
        </ResponseField>

        <ResponseField name="status" type="'pending'">
          Request status (always pending for refunds)
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.ugc.inc/billing/request-refund \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"account_id": "acc_123", "reason": "Not satisfied with service"}'
  ```

  ```typescript React theme={null}
  import { UGCClient } from 'ugcinc';

  const client = new UGCClient({ apiKey: 'YOUR_API_KEY' });
  const response = await client.billing.requestRefund({
    account_id: 'acc_123',
    reason: 'Not satisfied with service'
  });

  if (response.ok) {
    console.log(response.data.message);
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "ok": true,
    "code": 200,
    "message": "Success",
    "data": {
      "message": "Refund request submitted for review",
      "request": {
        "id": "req_125",
        "org_id": "org_123",
        "account_id": "acc_123",
        "type": "refund",
        "status": "pending",
        "reason": "Not satisfied with service",
        "created_at": "2025-01-15T10:00:00.000Z",
        "resolved_at": null
      }
    }
  }
  ```
</ResponseExample>
