Place Order
Create an order from a cart and complete the checkout process.
Authentication
This query supports both authenticated customers and guest users:
- Authenticated customers: Provide a valid customer authentication token in the
Authorizationheader. Obtain this token via the Customer Login API. - Guest users: Provide the Guest Cart Token
cartTokenobtained from the Create Cart mutation.
Authorization: Bearer <accessToken>Response
| Field | Type | Description |
|---|---|---|
id | String | Checkout order ID |
orderId | String | Created order ID |
Prerequisites
All of these must be completed before placing an order:
- ✅ Cart must contain items
- ✅ Shipping address must be set
- ✅ Billing address must be set
- ✅ Shipping method must be selected
- ✅ Payment method must be selected
- ✅ Valid coupon (if applicable)
Validation Rules
- Cart must have at least one item
- All checkout steps must be completed
- Billing and shipping addresses are required
- Shipping and payment methods must be selected
- Stock must be available for all items
- Inventory must not be exceeded
Error Responses
json
{
"errors": {
"checkout": ["Unable to complete checkout. Please verify all required fields."],
"inventory": ["Insufficient stock for one or more items."],
"payment": ["Payment processing failed."]
}
}Order Status Values
| Status | Description |
|---|---|
pending | Order created, awaiting payment |
processing | Payment confirmed, preparing shipment |
shipped | Order has been shipped |
delivered | Order delivered |
cancelled | Order cancelled |
refunded | Order refunded |
After Order Placement
- Cart is cleared
- Order confirmation email is sent
- Inventory is updated
- Customer can track order using order ID

