Simple Cart API (v1)
Complete Order
Completes checkout and places an order with encrypted payment information
POST
Complete Order
Overview
Completes the checkout process by placing an order with the merchant. This endpoint requires an existing cart with items and shipping information.Authentication
Device authentication token from Browser Session
Path Parameters
The merchant domain (e.g., “staging.luma.gift”)
Request Body
JWE-encrypted credit card data using the public key from Get Public Key endpoint
Billing 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
Captcha verification token when required by merchant
Response
Returns an order confirmation object with:The order number from the merchant
Unique identifier for the cart
Array of items in the order
Final order total with currency information
Delivery address details
Selected shipping option with pricing
Credit Card Encryption
The credit card must be encrypted as a JWE token with the following structure:Code Example
Prerequisites
Before calling this endpoint:- Cart must have at least one item
- Shipping information must be set
- Shipping method must be selected
Error Responses
| Code | Description |
|---|---|
ErrorInvalidInputBody | Request validation failed |
ErrorMissingRequiredParameters | Cart missing required data |
ErrorCartNotFound | No cart found for domain |
ErrorPaymentDeclined | Payment was declined |
ErrorStoreUnavailable | Merchant temporarily unavailable |
Related Endpoints
- Get Public Key - Get encryption key
- Set Shipping Info - Add delivery address
- Add Line Item - Add products to cart
Complete Order