# Request Flow

When a request is received, the system follows this control flow:

1. **Session Validation**: Check whether the user has an active checkout session.
2. **Basket Check**: Verify whether the basket is empty and whether the products are still available for purchase.
3. **Determine Page**: Determine which page should be shown according to the user's current state.
   * If there are completed steps, redirect to the first incomplete step
   * If all steps are completed, show the final confirmation page
4. **Context Creation**: Prepare and return the data required for the determined page.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.akinon.com/commerce-openapis/checkout/actions-performed-on-checkout-get-requests/request-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
