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

# Create Order

> Create a new POS payment order

Creates a new POS payment order with a dynamic QR code and/or payment page.

## Endpoint

`POST https://quickei.io/pay/sandbox/api/v1/orders`

## Parameters

<ParamField body="amount" type="decimal" required>
  Amount to charge. Must be greater than 0.
</ParamField>

<ParamField body="currency" type="string" required>
  ISO 4217 currency code (e.g. EUR, USD). Must match an active wallet.
</ParamField>

<ParamField body="payment_method" type="string">
  `qr_only`, `payment_page`, or `both` (default: `both`)
</ParamField>

<ParamField body="reference" type="string">
  Your internal order/invoice reference (max 255 chars)
</ParamField>

<ParamField body="description" type="string">
  Order description shown on the payment page (max 500 chars)
</ParamField>

<ParamField body="terminal_id" type="string">
  POS terminal identifier (max 64 chars)
</ParamField>

<ParamField body="callback_url" type="string">
  Webhook URL for order status updates
</ParamField>

<ParamField body="expires_in" type="integer">
  Expiration in seconds (60–3600, default: 300)
</ParamField>

<ParamField body="idempotency_key" type="string">
  Unique key to prevent duplicate orders (max 64 chars)
</ParamField>

## Example Request

```bash theme={null}
POST /merchant-api/pos/v1/orders
Authorization: Basic {base64_credentials}
Content-Type: application/json

{
  "amount": 25.00,
  "currency": "EUR",
  "payment_method": "both",
  "reference": "INV-2024-001",
  "description": "Table 5 - Lunch",
  "terminal_id": "terminal-01",
  "callback_url": "https://yoursite.com/webhook",
  "expires_in": 300,
  "idempotency_key": "idem_abc123"
}
```

## Success Response `200`

```json theme={null}
{
  "message": {
    "success": ["POS order created successfully"]
  },
  "data": {
    "order_id": "POS-20240115-A1B2C3",
    "amount": "25.00 EUR",
    "raw_amount": 25.00,
    "currency": "EUR",
    "payment_method": "both",
    "reference": "INV-2024-001",
    "description": "Table 5 - Lunch",
    "terminal_id": "terminal-01",
    "status": "PENDING",
    "qr_data": "quickei://pay?order=POS-20240115-A1B2C3&a=25.00&c=EUR",
    "payment_url": "https://quickei.io/pay/pos/POS-20240115-A1B2C3",
    "trx_id": null,
    "paid_at": null,
    "expires_at": "2024-01-15T14:05:00+00:00",
    "created_at": "2024-01-15T14:00:00+00:00"
  }
}
```
