> ## Documentation Index
> Fetch the complete documentation index at: https://zenskar.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Concepts: How the billing of a line item works

> This document explains how billing versions set when Zenskar invoices a line item, through a billing cadence and a payment timing, and how the billing has to fit the pricing of the line item.

## Billing of a line item

> [accordion] Walkthroughs
>
> You can start with a walkthrough instead of reading this document first. A walkthrough is the practical extension of the concepts in this document. It puts them into practice through one example with concrete values. Each part of the walkthrough explains the concepts that its steps apply and links to the sections that cover them.
>
> | Walkthrough | What it shows |
> | - | - |
> | [End-to-end walkthrough: How contracts work](https://zenskar.com/docs/20260301/zenskar-modules/contracts/walkthroughs/contracts.md) | This example-based document shows how your billing team records a one-year deal with Acme Corp as a contract: it adds API calls and seats as line items, adjusts their billing and quantity, previews the invoices, publishes the contract, and adds seats from January. |

> [accordion] Map of concepts
>
> | Concept | Details |
> | - | - |
> | | [Billing cadence](#billing-when-zenskar-invoices): Each billing version has one billing cadence, except a prepaid billing version for the on-demand quantity strategy, which can have none. |
> | | [Billing period](#billing-when-zenskar-invoices): The anchor dates of a line item decide the day on which its billing periods start. |
> | | [Payment timing](#billing-when-zenskar-invoices): Each billing version has one payment timing, which decides whether Zenskar invoices at the start of each billing period, or after it ends. |
> | | [Billing version](#billing-when-zenskar-invoices): The billing versions of a line item do not overlap. Within each pricing version, they cover all the dates, or none. |

> [accordion] Related modules
>
> The billing of a line item uses the following modules:
>
> | Module | Details |
> | - | - |
> | [Products](https://zenskar.com/docs/20260301/zenskar-modules/products/concepts/products.md#pricing-periods-the-time-that-an-amount-covers) | The billing of a line item is copied from its pricing preset when you add the product. The pricing period or the tier-reset period of the pricing preset decides which billing cadences fit. |
>
> The following modules use the billing of a line item:
>
> | Module | Details |
> | - | - |
> | Invoices | Zenskar invoices a line item once for each billing period, at the start of the billing period, or after it ends, as its payment timing sets. |

## Billing: when Zenskar invoices

The **billing cadence** is how often Zenskar invoices a [line item](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#line-item). It can be monthly, quarterly, semi-annual, annual, or a custom number of months or years.

A **billing period** is one period of the billing cadence. For example, with a monthly billing cadence, each billing period is one month. The [anchor dates](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#anchor-date) of a line item decide the day on which its billing periods start.

**Payment timing** is whether Zenskar invoices a line item at the start of each billing period, or after it ends:

| Payment timing | When Zenskar invoices |
| - | - |
| Prepaid | At the start of each billing period, for that period |
| Postpaid | On the day after each billing period ends, for that period |

For example, a seat line item with monthly prepaid billing is invoiced on March 1 for March. A line item for API calls, with monthly postpaid billing, is invoiced on April 1 for the calls made in March.

A **billing version** is the billing cadence and the payment timing that a line item uses for one range of dates within the [line-item duration](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#line-item-duration). The billing of a line item is copied from its [pricing preset](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#pricing-preset) when you add the [product](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#product). The line item then has its own copy. A later change to the billing of the line item does not change the pricing preset.

Each billing version has a payment timing and, in most cases, a billing cadence. A prepaid billing version for an [on-demand quantity strategy](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#on-demand-quantity-strategy) can have no billing cadence. Zenskar then invoices each purchase on its own, when it is made.

The billing versions of a line item do not overlap. Within each [pricing version](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#pricing-version), the billing versions cover all the dates, or none. Where a pricing version has no billing version, Zenskar copies the billing of its pricing preset, if the pricing preset has one. An [active contract](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#active-contract) needs billing for every pricing version.

Take, as an example, a [contract](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#contract) for 2027 that charges for two [products](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#product), each on its own [line item](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#line-item): seats, from January to December, and dedicated servers, from April to December.

In this contract, seats are billed monthly, prepaid, until March. The [customer](https://zenskar.com/docs/20260301/zenskar-modules/customers/glossary.md#customer) wants quarterly invoices from April. Seats are therefore billed quarterly, prepaid, from April. These are two [billing versions](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#billing-version). Both billing versions cover parts of the first [pricing version](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#pricing-version) of seats, which runs until June. The second billing version also covers the whole second pricing version, from July. Dedicated servers are billed monthly, prepaid, for their whole [line-item duration](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#line-item-duration).

```mermaid theme={null}
gantt
  title Billing versions in the example
  dateFormat YYYY-MM-DD
  axisFormat %b
  section Seats
  Pricing version of seats, USD 20 a seat             :2027-01-01, 2027-06-30
  Pricing version of seats, USD 22 a seat             :2027-07-01, 2027-12-31
  Billing version of seats, monthly, prepaid       :2027-01-01, 2027-03-31
  Billing version of seats, quarterly, prepaid     :2027-04-01, 2027-12-31
  section Dedicated servers
  Pricing version of dedicated servers, USD 500 a server           :2027-04-01, 2027-12-31
  Billing version of dedicated servers, monthly, prepaid       :2027-04-01, 2027-12-31
```

This conceptual diagram shows how the billing versions of the two line items in the example cover their pricing versions.

Billing that covers only part of a pricing version is not valid. For example, if the billing of seats stopped at the end of September, while the pricing version of USD 22 a seat runs to December, Zenskar would reject the contract.

```mermaid theme={null}
gantt
  title Not valid, billing covers only part of a pricing version
  dateFormat YYYY-MM-DD
  axisFormat %b
  section Seats
  Pricing version of seats, USD 20 a seat      :2027-01-01, 2027-06-30
  Pricing version of seats, USD 22 a seat      :2027-07-01, 2027-12-31
  Billing version of seats, monthly, prepaid   :2027-01-01, 2027-03-31
  Billing version of seats, quarterly, prepaid :2027-04-01, 2027-09-30
  No billing version of seats, not valid       :crit, 2027-10-01, 2027-12-31
```

This conceptual diagram shows billing that covers only part of a pricing version, which is not valid.

Once a billing period is invoiced, its payment timing cannot change. A change of payment timing can start only after the last invoiced billing period of the line item. A billing period counts as invoiced when its invoice is approved, partially paid, paid, void, or canceled.

## Billing and pricing

The billing cadence of a line item has to fit the pricing of the line item. Zenskar checks each billing version against each [pricing version](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#pricing-version) that it overlaps.

For a [period-of-time product](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#period-of-time-product-type), the billing cadence and the [pricing period](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#pricing-period) align: one is a whole multiple of the other. In the example, seats have a pricing period of one month, and are billed quarterly from April. Each billing period from April covers three pricing periods. A pricing period of two months does not fit quarterly billing.

```mermaid theme={null}
gantt
  title A monthly pricing period billed quarterly
  dateFormat YYYY-MM-DD
  axisFormat %b
  tickInterval 1month
  section Seats
  Pricing period of seats, April                      :2027-04-01, 2027-04-30
  Pricing period of seats, May                        :2027-05-01, 2027-05-31
  Pricing period of seats, June                       :2027-06-01, 2027-06-30
  Billing period of seats, April to June              :2027-04-01, 2027-06-30
```

This conceptual diagram shows how one quarterly billing period of seats covers three monthly pricing periods.

For a [point-in-time product](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#point-in-time-product-type) with the [volume pricing model](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#volume-pricing-model) or the [tiered pricing model](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#tiered-pricing-model), the [tier-reset period](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#tier-reset-period) and the billing cadence align in the same way. For example, a tier-reset period of one quarter fits monthly billing.

A billing version cannot be prepaid where a [quantity version](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#quantity-version) of the line item counts [metered usage](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#metered-usage) with the [on-demand quantity strategy](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#on-demand-quantity-strategy).

See [Set the billing of a line item](https://zenskar.com/docs/20260301/zenskar-modules/contracts/how-to-guides/line-items.md#set-the-billing-of-a-line-item).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.