> For the complete documentation index, see [llms.txt](https://developer.esw.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.esw.com/adobe-commerce-magento/adobe-commerce-extension-integration/getting-started/order-creation.md).

# Order Creation

## Configuring order confirmation <a href="#configuring-order-confirmation" id="configuring-order-confirmation"></a>

The module facilitates an API endpoint for the ESW system to send a request containing order confirmation to the retailer's system, referred to as the ESW Order Confirmation callback. This process triggers the conversion of a quote into an order in Adobe Commerce. Invoices are then automatically generated, placing the order in a processing state. This configuration can be modified as needed.

{% hint style="info" %}
The module order confirmation endpoint URL is:`{domain}/eshopworld/order/confirm/`
{% endhint %}

ESW required to enable Basic Auth protection to secure Order Confirmation and Webhooks callback URL from unauthorized third-party requests.

The configuration section for the Order Confirmation Configuration is accessible from the main ESW Module configuration tab.

<div data-with-frame="true"><img src="https://know.esw.com/download/attachments/1234731267/0cd62d2e-b41f-4ead-b197-d01231283775.png?version=1&#x26;modificationDate=1737650660456&#x26;cacheVersion=1&#x26;api=v2" alt=""></div>

### Order creation flow <a href="#order-creation-flow" id="order-creation-flow"></a>

The following steps explain the process flow:

{% stepper %}
{% step %}

#### Pay Now triggers confirmation

When a shopper clicks Pay Now, the payment is processed.

The ESW system sends an Order Confirmation API payload to the Order Confirmation API endpoint.

The payload includes product, shipping, service level, and payment data.
{% endstep %}

{% step %}

#### Endpoint processes the confirmation

When the endpoint receives the Order Confirmation request:

* The request data is validated.
* When validation passes, the request data is saved to the retailer's e-commerce platform.
* The quote is converted into an order.
* By default, based on the “Order Status” configuration, the "Paid" option creates an invoice.
* The status is updated to "processing" for online payment type.
  {% endstep %}

{% step %}

#### ESW receives the result

On success, the endpoint responds to ESW to confirm the action succeeded.

The order is created on the ESW platform.

The shopper is presented with the Order Confirmation page.

On failure, the shopper is presented with a failure notification page.

No order is created on the retailer's platform.

The order on the ESW platform will be cancelled.
{% endstep %}
{% endstepper %}

### Order details view <a href="#order-details-view" id="order-details-view"></a>

Order confirmation payload includes detailed information about financial transactions. This additional data is saved in the custom module table in the database and is accessible from the order details page.

<div data-with-frame="true"><img src="https://know.esw.com/download/attachments/1234731267/4fecf34c-8ec7-4293-913b-f7e72bd42c81.png?version=1&#x26;modificationDate=1723499583490&#x26;cacheVersion=1&#x26;api=v2" alt=""></div>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://developer.esw.com/adobe-commerce-magento/adobe-commerce-extension-integration/getting-started/order-creation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
