> ## 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.

# Get Billing Requests

> Get all billing requests (replacements and refunds)

## Endpoint

```
GET https://api.ugc.inc/billing/requests
```

## Overview

Retrieve all billing requests (replacements and refunds) for your account. Returns requests across all organizations linked to your billing record.

## Request

No request body required. Authentication via profile-scoped Bearer token.

## Response

<ResponseField name="data" type="array">
  Array of billing request objects

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

    <ResponseField name="org_id" type="string">
      Organization ID the request belongs to
    </ResponseField>

    <ResponseField name="account_id" type="string">
      Account ID the request is for
    </ResponseField>

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

    <ResponseField name="status" type="'pending' | 'approved' | 'denied'">
      Request status
    </ResponseField>

    <ResponseField name="reason" type="string | null">
      Reason provided with the request
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 timestamp of when the request was created
    </ResponseField>

    <ResponseField name="resolved_at" type="string | null">
      ISO 8601 timestamp of when the request was resolved (null if pending)
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.ugc.inc/billing/requests \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

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

  const client = new UGCClient({ apiKey: 'YOUR_API_KEY' });
  const response = await client.billing.getRequests();

  if (response.ok) {
    response.data.forEach(request => {
      console.log(`${request.type} - ${request.status} (${request.id})`);
    });
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "ok": true,
    "code": 200,
    "message": "Success",
    "data": [
      {
        "id": "req_123",
        "org_id": "org_123",
        "account_id": "acc_123",
        "type": "replacement",
        "status": "approved",
        "reason": "Account was banned",
        "created_at": "2025-01-15T10:00:00.000Z",
        "resolved_at": "2025-01-15T10:00:00.000Z"
      },
      {
        "id": "req_124",
        "org_id": "org_123",
        "account_id": "acc_456",
        "type": "refund",
        "status": "pending",
        "reason": "Not satisfied",
        "created_at": "2025-01-20T10:00:00.000Z",
        "resolved_at": null
      }
    ]
  }
  ```
</ResponseExample>
