Skip to main content
An order (invoice) holds the products, the customer and the price. The customer pays on the hosted checkout_url, where they choose any payment method your store accepts. Orders created through the API follow the same rules as your storefront: prices come from your catalogue, stock is reserved, coupons and product rules apply, and fraud checks run.

Create an order

Response (201)
Redirect the customer to checkout_url. Unpaid orders expire after 3 hours.

Physical products

For products that ship, add the address. Get the options first with POST /shipping/quote, or leave out shipping_rate_id to use the cheapest rate.
Shipping is added to total_cents and shown as shipping_cents. Without an address, the customer enters it on the checkout page before paying. After payment, ship the order with POST /orders/{invoiceId}/shipments.

Order statuses

Listen to the order.completed webhook instead of polling. See Webhooks.

After the order is created

Use your own order ID as the Idempotency-Key for create, complete and refund calls. Retries then never create a second order or a second refund.