# Create an order

**POST** `/orders`

Base URL: `https://sandbox.api.example.com/v1`

Create an order

## Authorization

- bearerAuth (http, bearer)

## Body

Content type: `application/json`

- `amount` (integer, required)
  Amount in the smallest currency unit.
- `currency` (string, required)
  Three-letter ISO 4217 code.

Example:

```json
{
  "amount": 2500,
  "currency": "USD"
}
```

## Responses

### 201

The created order.

- `id` (string)
- `amount` (integer)
- `currency` (string)
- `status` ("pending" | "paid" | "canceled")

Example:

```json
{
  "id": "ord_123",
  "amount": 2500,
  "currency": "USD",
  "status": "pending"
}
```

### 401

Missing or invalid API key.

- `error` (object)
  - `code` (string)
  - `message` (string)

Example:

```json
{
  "error": {
    "code": "not_found",
    "message": "Order not found."
  }
}
```