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

# Add data

> Adds GB to an existing residential or premium residential package. GB credits are used first, then your wallet balance.

Adds GB directly to an existing residential or premium residential package. Your reusable GB credits are consumed first, and your wallet balance is charged for the remaining GB.

The response shows how the top-up was paid: `gb_credit_used` is the GB covered by credits, and `billable_quantity` is the GB charged to your wallet.

<ParamField path="id" type="string" required>
  ID of the package to add data to, from [list packages](/api/packages/list).
</ParamField>

<ParamField body="quantity" type="number" required>
  Number of GB to add.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://flameproxies.com/api/customer/packages/PACKAGE_ID/add-data \
    -H "Authorization: Bearer fp_live_xxx" \
    -H "Content-Type: application/json" \
    -d '{"quantity":2}'
  ```

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

  package_id = 123
  resp = requests.post(
      f"https://flameproxies.com/api/customer/packages/{package_id}/add-data",
      headers={"Authorization": "Bearer fp_live_xxx"},
      json={"quantity": 2},
  )
  print(resp.json()["order"])
  ```

  ```javascript Node.js theme={null}
  const packageId = 123;
  const resp = await fetch(
    `https://flameproxies.com/api/customer/packages/${packageId}/add-data`,
    {
      method: "POST",
      headers: {
        Authorization: "Bearer fp_live_xxx",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({ quantity: 2 }),
    }
  );
  console.log(await resp.json());
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "package_id": 123,
    "internal_id": "70437286-78a1-427c-b9fd-c299baadf3a9",
    "subuser_id": "56789",
    "order": {
      "id": 988,
      "status": "paid",
      "action": "topup",
      "product": "premium_residential",
      "quantity": 2,
      "gb_credit_used": 1,
      "billable_quantity": 1,
      "total_amount": 3.5,
      "created_at": "2026-05-13T12:00:00.000Z"
    }
  }
  ```
</ResponseExample>

## Response

<ResponseField name="package_id" type="number">
  Numeric package ID.
</ResponseField>

<ResponseField name="internal_id" type="string">
  The package's UUID.
</ResponseField>

<ResponseField name="subuser_id" type="string">
  ID of the sub-user behind this package.
</ResponseField>

<ResponseField name="order" type="object">
  The top-up order.

  <Expandable title="order">
    <ResponseField name="id" type="number">
      Order ID.
    </ResponseField>

    <ResponseField name="status" type="string">
      Order status, for example `paid`.
    </ResponseField>

    <ResponseField name="action" type="string">
      `topup` for add data orders.
    </ResponseField>

    <ResponseField name="product" type="string">
      Product: `residential` or `premium_residential`.
    </ResponseField>

    <ResponseField name="quantity" type="number">
      GB added to the package.
    </ResponseField>

    <ResponseField name="gb_credit_used" type="number">
      GB paid for with GB credits.
    </ResponseField>

    <ResponseField name="billable_quantity" type="number">
      GB charged to your wallet balance.
    </ResponseField>

    <ResponseField name="total_amount" type="number">
      Amount charged to your wallet, in USD.
    </ResponseField>

    <ResponseField name="created_at" type="string">
      When the order was created, as an ISO 8601 timestamp.
    </ResponseField>
  </Expandable>
</ResponseField>
