Simple Cart API (v1)
Place Order
Creates a cart and places an order in a single operation
POST
Place Order
Overview
Creates a new cart, add items, set shipping information, and place an order - all in one API call. This endpoint is ideal for simple checkout flows where you want to minimize API calls.Authentication
Device authentication token from Browser Session
Path Parameters
The merchant domain (e.g., “staging.luma.gift”)
Query Parameters
Enable Server-Sent Events for real-time progress updates. Set to “true” to receive events.
Request Body
JWE-encrypted credit card data using the public key from Get Public Key endpoint
Billing address information (same structure as shipping_info)
Shipping address informationRequired fields:
first_name(string): Customer’s first namelast_name(string): Customer’s last nameemail(string): Email addressphone(string): Phone numberaddress1(string): Primary address linecity(string): City namestate_or_province(string): State/province codecountry(string): Country name or codepostal_code(string): ZIP or postal code
address2(string): Secondary address linecompany(string): Company name
Array of items to add to cart. Each item must have:
Captcha verification token when required by merchant
Response
Returns a comprehensive order confirmation object including cart details, order information, and payment confirmation.Unique identifier for the cart
The order number from the merchant platform
Status of the cart (e.g., “submitted”)
ISO timestamp when the order was submitted
Merchant’s display name
E-commerce platform identifier (e.g., “magento”, “shopify”)
Merchant domain
Relevant URLs for the order
Array of items in the order
Delivery address details
Billing address details
Selected shipping method with pricing
Summary of payment method used
Grand total including all costs
Subtotal before shipping and tax
Shipping cost
Tax amount
Total discount applied
Server-Sent Events
Whensse=true, the endpoint streams progress events:
creating-cart- Cart creation starteditem-added- Item added to cart (includes cart data)shipping-updated- Shipping info set (includes cart data)order-placed- Order successfully placed (includes order data)error- Error occurred (includes error details)
Code Example
Request Example
Response Example
Error Responses
| Code | Description |
|---|---|
ErrorInvalidInputBody | Request validation failed |
ErrorProductNotFound | Variant ID not found |
ErrorNotEnoughStock | Insufficient inventory |
ErrorPaymentDeclined | Payment was declined |
ErrorStoreUnavailable | Merchant temporarily unavailable |
Related Endpoints
- Get Public Key - Get encryption key
- Complete Order - Alternative flow with existing cart
Place Order