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

# Create Order

> Creates a new order for a customer in the admin dashboard.
Requires the `stores.orders.create` permission.

## Payment Methods

When creating an order, specify the `paymentMethod` field using one of the supported payment method codes. See the [Payment Methods reference](/api-reference/payment-methods) for the complete list of available options.

## Redirecting to Checkout

After successfully creating an order, redirect the customer to the hosted checkout page to complete payment:

```
https://checkout.komerza.com/checkout/{orderId}
```

### Example

```javascript theme={null}
const response = await fetch(`/stores/${storeId}/orders`, {
  method: "POST",
  headers: { Authorization: `Bearer ${apiKey}` },
  body: JSON.stringify(orderData),
});

const result = await response.json();

if (result.success) {
  const orderId = result.data.id;
  window.location.href = `https://checkout.komerza.com/checkout/${orderId}`;
}
```

<Note>
  The checkout page handles payment processing, order confirmation, and receipt
  generation automatically.
</Note>


## API Specification

The full API specification for this endpoint is available in the [documentation index](https://docs.komerza.com/llms.txt).
