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

# Order Management

> Create, track, and manage the full lifecycle of orders. From draft through payment, capture, and refund.

## What is Order Management?

The Dintero Order Management API lets you create and manage orders independently of payment. Payment is handled by your payment system. The Order Management API records what has happened (authorized, captured, refunded) but does not execute payment operations itself.

## Order lifecycle

**1. Draft**

Create a draft order with line items. The order is not yet active and can be freely modified.

[POST /accounts/\{aid}/shopping/draft\_orders](/api-reference/draft/aid_draft_orders_post.md)

**2. Active**

Complete the draft to make the order active and assign it an `order_id`.

[PUT /accounts/\{aid}/shopping/draft\_orders/\{id}/complete](/api-reference/draft/aid_draft_orders_id_complete_put.md)

**3. Authorized**

Authorize the payment in your payment system. Then record the authorization on the order to mark funds as reserved.

[POST /accounts/\{aid}/shopping/orders/\{order\_id}/authorizations](/api-reference/orderauthorizations/aid_orders_id_authorization_post.md)

**4. Captured**

Capture the payment in your payment system. Then record the capture on the order to keep the order state in sync.

[POST /accounts/\{aid}/shopping/orders/\{order\_id}/captures](/api-reference/ordercaptures/aid_orders_id_capture_post.md)

**5. Refunded or Cancelled**

Refund the payment in your payment system and record the refund on the order, or cancel an uncaptured order.

[POST /accounts/\{aid}/shopping/orders/\{order\_id}/refunds](/api-reference/orderrefunds/aid_orders_id_refunds_post.md)

[POST /accounts/\{aid}/shopping/orders/\{order\_id}/cancel](/api-reference/orderstatus/aid_orders_id_cancel_post.md)

## Guides

> **[Orders and Checkout](/docs/order-management/checkout-orders.md)**
>
> How to combine the Order Management and Checkout services. Create a draft order, take payment, capture, and refund in one end-to-end flow.

> **[Update an order (reversing)](/docs/order-management/order-update-refund.md)**
>
> How to modify an existing order by reversing items and adding new ones, keeping captured amounts and refunds aligned.


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