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

# Create Order

> Create a new proxy order programmatically.

Create a new proxy order. Orders are automatically billed through Stripe integration.

## Request

### Headers

| Header          | Value                   | Required |
| --------------- | ----------------------- | -------- |
| `Authorization` | `Bearer {your_api_key}` | Yes      |
| `Content-Type`  | `application/json`      | Yes      |

### Body Parameters

<ParamField body="quantity" type="integer" required>
  Number of proxies to order. Must be greater than 0.
</ParamField>

<ParamField body="product_type" type="string" required>
  Type of proxy product to order. The following datacenter pool values are available:

  | `product_type` | Product                                 |
  | -------------- | --------------------------------------- |
  | `sprint`       | Sprint Proxies                          |
  | `captcha`      | Captcha Proxies                         |
  | `events`       | Stat Private Event ISP's / X1 Fiber ISP |
  | `lumen`        | Lumen Proxies / Level 3 Fiber ISP       |
</ParamField>

<ParamField body="customer" type="string">
  Optional customer identifier for tracking. Must be lowercase letters only (a-z), max 50 characters.
</ParamField>

### Example Request

```bash theme={null}
curl -X POST "https://dashboard.statproxies.com/api/v2/order/newscale" \
  -H "Authorization: Bearer {your_api_key}" \
  -H "Content-Type: application/json" \
  -d '{
    "quantity": 10,
    "product_type": "captcha",
    "customer": "clientabc"
  }'
```

## Response

### Success Response

<ResponseField name="response" type="string">
  Status of the request. Returns `"success"` on successful order creation.
</ResponseField>

<ResponseField name="order_id" type="string">
  Unique identifier for the order. Use this to fetch proxy details.
</ResponseField>

<ResponseField name="subscription_id" type="string">
  Stripe subscription ID for billing management.
</ResponseField>

```json theme={null}
{
  "response": "success",
  "order_id": "sub_1rqjp3jb4g9i6pkhdwmkpjob",
  "subscription_id": "sub_1RqJP3JB4G9i6PKHDwmKPJOb"
}
```

### Error Responses

#### 400 Bad Request - Missing Fields

```json theme={null}
{
  "response": "Missing required fields"
}
```

#### 400 Bad Request - Invalid Product Type

```json theme={null}
{
  "response": "Invalid product_type"
}
```

#### 400 Bad Request - Invalid Quantity

```json theme={null}
{
  "response": "Quantity must be greater than 0"
}
```

#### 400 Bad Request - Invalid Customer ID

```json theme={null}
{
  "response": "Customer ID must contain only lowercase letters (a-z)"
}
```

#### 401 Unauthorized

```json theme={null}
{
  "error": "invalid_api_key"
}
```

## Notes

* Orders are automatically billed through your connected Stripe account
* Proxy credentials become active immediately after successful order creation
* The `order_id` is a lowercase version of the subscription ID and is used as the proxy username
* If using an organization API key, the order is billed to the organization's Stripe customer

## Related Endpoints

<CardGroup cols={2}>
  <Card title="List Orders" icon="list" href="/api-reference/order/list-orders">
    View all your active orders.
  </Card>

  <Card title="Get Order" icon="download" href="/api-reference/order/get-order">
    Fetch proxy details for an order.
  </Card>
</CardGroup>
