# Home delivery

{% hint style="info" %}
Implementation is **OPTIONAL**
{% endhint %}

### General flow

Client flow

* add products into shopping cart
* choose delivery method and time
* authorize the payment

Merchant flow

* confirm or reject order
* process order and update order status

{% hint style="warning" %}
**The payment will be settled after merchant has been sent out the order !** This process is needed because merchant may not be able to fully fill the order due the out of stock products.
{% endhint %}

{% hint style="info" %}
The authorized payment **will be release** when merchant reject the order or authorization will be expired. Authorization expiration time is set by the card network.
{% endhint %}

### Configuration

**Configure home delivery via Smarts manager UI.**  Smarts supports 3 delivery methods: **courier, parcel, pickup by myself.** Home delivery can be fully customized. You can set delivery price, reaction time for each store, availability time and dates, location and much more.

**Implement required endpoints for home delivery**

{% hint style="info" %}
**Smarts Worker App can be used also to manage home delivery orders**&#x20;
{% endhint %}

### Implementation

Create following endpoints

[**Receive order endpoint**](/integration/custom-integration/home-delivery/receive-order-endpoint.md)

[**Receive order update endpoint**](/integration/custom-integration/home-delivery/receive-order-update-endpoint.md)

Create following services to send and request order information from Smarts.

[**Update order status**](/integration/custom-integration/home-delivery/update-order-status.md)

[**Find order by id**](/integration/custom-integration/home-delivery/find-order-by-id.md)

[**Find order by invoice id**](/integration/custom-integration/home-delivery/find-order-by-invoice-id.md)

[**Find order by institution invoice id**](/integration/custom-integration/home-delivery/find-order-by-institution-invoice-id.md)


---

# 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://developer.smarts.ee/integration/custom-integration/home-delivery.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.
