---
title: Configuring invoices
related:
  - https://docs.kentico.com/k10/e-commerce-features/managing-your-store/orders.md
  - https://docs.kentico.com/k10/macro-expressions.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/k10/e-commerce-features/managing-your-store/customers.md) to indicate purchase-related details:

- [Products](https://docs.kentico.com/k10/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/k10/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/k10/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/k10/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/k10/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/k10/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/k10/e-commerce-features/configuring-your-store/configuring-e-commerce-email-notifications.md).

The system allows you to further modify the invoice design by using special expressions, i.e. [macros](https://docs.kentico.com/k10/macro-expressions.md), to insert dynamic parts of the invoice. For example, you can use the _{% Order.OrderInvoiceNumber %}_ expression to insert the invoice number.

### Macro examples

The following table contains macro examples that you can use in the invoice template.

> **Info:** The macros always display values from the database table row, which belongs to the order or the order's object.

| Macro                                          | Description and examples                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Price related macros                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| {%Currency.__%}                                | Displays a value from a column in the [currency](https://docs.kentico.com/k10/e-commerce-features/configuring-your-store/configuring-currencies.md) database table (_COM\_Currency_).<br>{%Currency.CurrencyCode%} – displays the currency's code (e.g. USD)                                                                                                                                                                                                                                                                                                          |
| {%TotalPrice%}                                 | Displays the total order's price.<br>{%TotalPrice.Format(Currency.CurrencyFormatString)%} – displays the total price formatted as specified in the [currency's format string](https://docs.kentico.com/k10/e-commerce-features/configuring-your-store/configuring-currencies.md) (without any rounding)<br>{%FormatPrice(TotalPrice, true)%} – displays the total price [rounded to the decimal places and formatted as specified in the currency's format string](https://docs.kentico.com/k10/e-commerce-features/configuring-your-store/configuring-currencies.md) |
| {%TotalShipping%}                              | Displays the order's shipping price.<br>{%TotalShipping.Format(Currency.CurrencyFormatString)%} – displays the total shipping of the order formatted as specified in the currency's format string                                                                                                                                                                                                                                                                                                                                                                     |
| {%ContentTaxesTable.ApplyTransformation(__)%}  | Displays a list of all taxes used in the order using specified transformation.<br>{%ContentTaxesTable.ApplyTransformation("Ecommerce.Transformations.Order\_TaxesTable", "Ecommerce.Transformations.Order\_TaxesTableHeader", "Ecommerce.Transformations.Order\_TaxesTableFooter")%} – displays the list using the default transformations for the header, body and footer.                                                                                                                                                                                           |
| {%ShippingTaxesTable.ApplyTransformation(__)%} | Displays a list of all taxes applied to the used shipping option using specified transformations.<br>{%ShippingTaxesTable.ApplyTransformation("Ecommerce.Transformations.Order\_TaxesTable", "Ecommerce.Transformations.Order\_TaxesTableHeader", "Ecommerce.Transformations.Order\_TaxesTableFooter")%} – displays the list using the default transformations for the header, body and footer.                                                                                                                                                                       |
| Order related macros                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| {%Order.\*%}                                   | Displays a value from a column in the [order](https://docs.kentico.com/k10/e-commerce-features/managing-your-store/orders.md) database table (_COM\_Order_).<br>{%Order.OrderInvoiceNumber%} – displays the invoice number<br>{%Order.OrderNote\|(encode)%} – displays [encoded](https://docs.kentico.com/k10/macro-expressions/macro-syntax.md) order note<br>{%Order.OrderIsPaid%} – displays the paid status of the order<br>{%Format(Order.OrderDate, "{0:d}")%} – displays the formatted order date                                                              |
| {%OrderStatus.__%}                             | Displays a value from a column in the [order status](https://docs.kentico.com/k10/e-commerce-features/managing-your-store/orders/order-statuses.md) database table (_COM\_OrderStatus_).<br>{%OrderStatus.StatusDisplayName%} – displays the order status's display name                                                                                                                                                                                                                                                                                              |
| {%ShippingOption.__%}                          | Displays a value from a column in the [shipping option](https://docs.kentico.com/k10/e-commerce-features/configuring-your-store/configuring-shipping-options.md) database table (_COM\_ShippingOption_).<br>{%ShippingOption.ShippingOptionDisplayName%} – displays the shipping option's display name                                                                                                                                                                                                                                                                |
| {%PaymentOption.__%}                           | Displays a value from a column in the [payment method](https://docs.kentico.com/k10/e-commerce-features/configuring-your-store/configuring-payment-methods.md) database table (_COM\_PaymentOption_).<br>{%PaymentOption.PaymentOptionDisplayName%} – displays the payment method's display name                                                                                                                                                                                                                                                                      |
| {%DiscountCoupon.__%}                          | Displays a value from a column in the [product coupon](https://docs.kentico.com/k10/e-commerce-features/managing-your-store/discounts/working-with-discount-coupons/working-with-product-coupons.md) data column (_COM\_DiscountCoupon_).<br>{%DiscountCoupon.DiscountCouponDisplayName%} – displays the product coupon's display name                                                                                                                                                                                                                                |
| {%ContentTable.ApplyTransformation(__)%}       | Displays a list of the ordered products using specified transformations.<br>{%ContentTable.ApplyTransformation("Ecommerce.Transformations.Order\_ContentTable", "Ecommerce.Transformations.Order\_ContentTableHeader", "Ecommerce.Transformations.Order\_ContentTableFooter")%} – displays the list using the default transformations for the header, body and footer.                                                                                                                                                                                                |
| {%ShoppingCart.__%}                            | Displays a value from a column in the shopping cart database table (_COM\_ShoppingCart_). With the shopping cart, you can get to any other mentioned macro, for example:<br>{%ShoppingCart.ShoppingCartCurrency.CurrencyCode%} – displays the currency's code (e.g. USD)                                                                                                                                                                                                                                                                                              |
| Customer related macros                        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| {%Customer.__%}                                | Displays a value from a column in the customer database table (_COM\_Customer_).<br>{%Customer.CustomerEmail%} – displays the customer's email address<br>{%Customer.CustomerOrganizationID%} – displays the customer's organization ID (for company accounts)<br>{%Customer.CustomerTaxRegistrationID%} – displays the customer's tax registration ID (for company accounts)                                                                                                                                                                                         |
| {%BillingAddress.__%}                          | Displays a value from a column in the billing address database table (_COM\_OrderAddress_).<br>{%BillingAddress.AddressLine1%} – displays the first line of the billing address                                                                                                                                                                                                                                                                                                                                                                                       |
| {%BillingAddress.Country.__%}                  | Displays a value from a column in the billing address country database table (_CMS\_Country_).<br>{%BillingAddress.Country.CountryDisplayName%} – displays the billing address's country display name                                                                                                                                                                                                                                                                                                                                                                 |
| {%BillingAddress.State.__%}                    | Displays a value from a column in the billing address state database table (_CMS\_State_).<br>{%BillingAddress.State.StateDisplayName%} – displays the billing address's state display name                                                                                                                                                                                                                                                                                                                                                                           |
| {%ShippingAddress.__%}                         | Displays a value from a column in the shipping address database table (_COM\_OrderAddress_).<br>{%ShippingAddress.AddressLine1%} – displays the first line of the shipping address                                                                                                                                                                                                                                                                                                                                                                                    |
| {%ShippingAddress.ApplyTransformation(__)%}    | Displays the formatted shipping address (_COM\_OrderAddress_) using the specified transformation.<br>{%ShippingAddress.ApplyTransformation("Ecommerce.Transformations.Order\_Address")%} – displays the shipping address using the default transformation for formatting addresses                                                                                                                                                                                                                                                                                    |
| {%ShippingAddress.Country.__%}                 | Displays a value from a column in the shipping address country database table (_CMS\_Country_).<br>{%ShippingAddress.Country.CountryDisplayName%} – displays the shipping address's country display name                                                                                                                                                                                                                                                                                                                                                              |
| {%ShippingAddress.State.__%}                   | Displays a value from a column in the shipping address state database table (_CMS\_State_).<br>{%ShippingAddress.State.StateDisplayName%} – displays the shipping address's state display name                                                                                                                                                                                                                                                                                                                                                                        |

> **Tip:** Learn more about macros in [Macro expressions](https://docs.kentico.com/k10/macro-expressions.md).
