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

# Checkout flow

The complete ordering flow from menu to confirmed order:

<img src="https://mintcdn.com/atlaskitchen/PbQq0fyxwtbdSf_o/images/connect/checkout-flow.svg?fit=max&auto=format&n=PbQq0fyxwtbdSf_o&q=85&s=0980d68d68caa1df708fd60b32236fe4" alt="Checkout Flow" width="987" height="1468" data-path="images/connect/checkout-flow.svg" />

## After payment

After creating a payment intent, direct the diner to the `atlas_pay_url` to complete payment. Then poll `POST /cart/order` to confirm:

```
1. POST /payment_intents       → get atlas_pay_url
2. Direct diner to atlas_pay_url
3. Poll POST /cart/order
   - 422 → payment not yet complete, keep polling
   - 200 → order confirmed, stop polling
```

`POST /cart/order` validates the payment **in real-time** against the payment processor. It does **not** depend on webhooks

* **Payment succeeded** → cart converts to a confirmed order, full order object returned
* **Payment not completed** → `422` with `"Insufficient payment made to the cart"`

<Tip>
  `POST /cart/order` is idempotent — if called after the order is already created, it returns the existing order. Safe to retry
</Tip>
