---
title: Configuring invoices
related:
  - https://docs.kentico.com/k9/e-commerce-features/managing-your-store/orders.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

Invoices (receipts) are commercial documents that you issue to the [customers](https://docs.kentico.com/k9/e-commerce-features/managing-your-store/customers.md) to indicate purchase-related details:

- [Products](https://docs.kentico.com/k9/e-commerce-features/managing-your-store/products.md)
- Quantities
- Prices
- Other purchase-related details

The Kentico E-commerce Solution allows you to customize the invoice design. After configuring invoices, you can work with them while editing an order in the **Orders** application on the **Invoice** tab.

![Editing an order - Invoice tab](https://docs.kentico.com/docsassets/k9/configuring-invoices/editing_order_invoice_tab.png "Editing an order - Invoice tab")

## Setting up the invoice number pattern

With the default invoice number pattern, the system displays the invoice number equal to the order number. If you want to change the format of the invoice number, change the corresponding setting:

1. Open the **Store configuration** application (if you want to set up the invoice number pattern for the current site) or the **Multistore configuration** application (if you want to set up the invoice [globally](https://docs.kentico.com/k9/e-commerce-features/configuring-your-store/choosing-site-or-global-e-commerce-configuration.md)).

   > **Tip:** If you are not sure what to choose, see [Choosing site or global e-commerce configuration](https://docs.kentico.com/k9/e-commerce-features/configuring-your-store/choosing-site-or-global-e-commerce-configuration.md). If you are not sure about specifics of configuring in these applications, see [Configuring e-commerce settings for a specific site or globally](https://docs.kentico.com/k9/e-commerce-features/configuring-your-store/choosing-site-or-global-e-commerce-configuration/configuring-e-commerce-settings-for-a-specific-site-or-globally.md).
2. In the **Invoice number pattern** field in the **Invoice** category, type the required pattern.

   > **Tip:** You can use macros. For example, the default pattern is: _{% Order.OrderID %}_

   - If you are in the **Store configuration** application, clear the _Inherit from global settings_ option first.
3. Click **Save**.

The system generates new invoices with their numbers formatted according to the specified setting.

## Setting up the appearance of invoices

You can configure the invoice template in the **Store configuration** application (if you want to set up the invoice for the current site) or in the **Multistore configuration** (if you want to set up the invoice [globally](https://docs.kentico.com/k9/e-commerce-features/configuring-your-store/choosing-site-or-global-e-commerce-configuration.md)) on the **Invoice** tab.

> **Info:** This configuration sets only the invoice which is displayed in the administration user interface and which you can print. If you want to send the invoice via email, [configure the corresponding email notification](https://docs.kentico.com/k9/e-commerce-features/configuring-your-store/configuring-e-commerce-email-notifications.md).

The system allows you to further modify the invoice design by:

- Using the built-in [editor](https://docs.kentico.com/k9/managing-website-content/working-with-pages/editing-pages/using-the-editor.md) to edit HTML code representing your invoice.
- Using special expressions, i.e. [macros](https://docs.kentico.com/k9/macro-expressions.md), to insert dynamic parts of the invoice. For example, you can use the _{% Order.OrderInvoiceNumber #%}_ expression to insert the invoice number.

If you click the **Click here for invoice macro examples** hyperlink, the system displays a complete list of available dynamic expressions:

![Viewing available macro examples](https://docs.kentico.com/docsassets/k9/configuring-invoices/viewing_available_macro_examples.png "Viewing available macro examples")

### Adding attachments to invoices

You can also attach files to the invoice. For example, you can upload an image and insert it into the invoice. The system allows users to perform the following actions on uploaded files:

- **Edit** () – if the file is an image, the system opens the image in the built-in [image editor](https://docs.kentico.com/k9/managing-website-content/working-with-files/editing-images.md). If the file is not an image, the system opens the file in the [metadata editor](https://docs.kentico.com/k9/configuring-kentico/managing-files/editing-file-metadata.md).
- **Delete** () – removes the selected attachment.
- **Update** () – use the action if you want to update the attached file, or replace it with a different file.

> **Info:** The **Attachments** section is available only in the **Store configuration** application when modifying the site invoice template.

![Adding an attachment to the invoice](https://docs.kentico.com/docsassets/k9/configuring-invoices/adding_attachment.png "Adding an attachment to the invoice")
