> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spurtcommerce.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Orders

Order creation, status transitions, and history.

An order is the durable record of a checkout transaction. The target source defines the order number, line-item snapshots, totals, payment state, fulfillment state, and allowed transitions.

## Typical lifecycle

Cart validation → address/shipping selection → server-side total calculation → payment initiation/confirmation → order persistence → fulfillment and status updates. The exact sequence may vary by payment method and implementation.

## Order integrity

* Snapshot item names, SKUs, prices, tax, discounts, and quantities at purchase time.
* Use database transactions for related writes where appropriate.
* Make retries and payment callbacks idempotent.
* Validate that a caller can access the requested order.
* Keep payment status separate from fulfillment/order status if the data model does so.
* Audit manual status changes and refunds.

## Verification

Trace checkout/order services, entities, status tables, payment integrations, and migrations. Publish exact status values and endpoints only after confirming the release implementation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.