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

# Create an order

> Creates a new residential or premium residential package, paid from your GB credits and wallet balance.

Creates a new package and pays for it from your balance. The package's sub-user is created immediately, and the response returns the new package's identifiers. Use them to [read its credentials](/api/packages/get) or [generate proxies](/api/proxies/generate) right away.

Your reusable GB credits are consumed first, and your wallet balance is charged for the rest. Check both with [get wallet balance](/api/account/balance) before ordering.

<Tip>
  To add bandwidth to a package you already have, use [add data](/api/packages/add-data) instead. Each order creates a new, separate package with its own credentials.
</Tip>

<ParamField body="product" type="string" required>
  Product slug: `residential` or `premium_residential`.
</ParamField>

<ParamField body="quantity" type="number" required>
  Number of GB for the new package.
</ParamField>

<ParamField body="region" type="string">
  Optional region code for the package, for example `US`.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://flameproxies.com/api/customer/orders \
    -H "Authorization: Bearer fp_live_xxx" \
    -H "Content-Type: application/json" \
    -d '{"product":"residential","quantity":5}'
  ```

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

  resp = requests.post(
      "https://flameproxies.com/api/customer/orders",
      headers={"Authorization": "Bearer fp_live_xxx"},
      json={"product": "residential", "quantity": 5},
  )
  order = resp.json()["order"]
  print(order["package_id"], order["total_amount"])
  ```

  ```javascript Node.js theme={null}
  const resp = await fetch("https://flameproxies.com/api/customer/orders", {
    method: "POST",
    headers: {
      Authorization: "Bearer fp_live_xxx",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ product: "residential", quantity: 5 }),
  });
  const { order } = await resp.json();
  console.log(order.package_id, order.total_amount);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "order": {
      "id": 987,
      "status": "paid",
      "action": "create",
      "package_id": 1234,
      "internal_id": "70437286-78a1-427c-b9fd-c299baadf3a9",
      "subuser_id": "56789",
      "product": "residential",
      "quantity": 5,
      "gb_credit_used": 1,
      "billable_quantity": 4,
      "total_amount": 6.25,
      "created_at": "2026-05-13T12:00:00.000Z"
    }
  }
  ```
</ResponseExample>

## Response

<ResponseField name="order" type="object">
  The new 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">
      `create` for new packages.
    </ResponseField>

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

    <ResponseField name="internal_id" type="string">
      UUID of the new package.
    </ResponseField>

    <ResponseField name="subuser_id" type="string">
      ID of the new package's sub-user.
    </ResponseField>

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

    <ResponseField name="quantity" type="number">
      GB on the new 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>
