API Reference

Orders API

Create, retrieve, and manage orders programmatically. The Orders API is the core of the headless checkout experience.

The Order Object

An order represents a completed purchase. It contains line items, customer details, shipping information, and the payment status.

Attributes

FieldTypeDescription
idstringUnique identifier for the order (e.g., ord_123).
statusstringOne of pending, paid, shipped, refunded.
totalintegerTotal amount in the smallest currency unit (e.g., cents).
Create Order
const response = await fetch('https://api.devcarts.store/v1/orders', {method: 'POST', headers: {'Authorization': 'Bearer dc_live_sk_...','Content-Type': 'application/json'}, body: JSON.stringify({items: [{ product_id: 'prod_987', quantity: 2 }], customer_email: 'buyer@example.com'})});const order = await response.json();

Use our SDKs instead

Faster integration for Node, React, and Python.