> ## 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 line-item discounts work

> This document explains how line-item discounts reduce the charge of a line item, how the discount order decides which line-item discount applies first, and how each discount type reduces the charge, before or after Zenskar calculates it.

## Line-item discounts

> [accordion] Map of concepts
>
> | Concept | Details |
> | - | - |
> | [Discount order](#discount-order-which-line-item-discount-applies-first) | Each line-item discount applies to the result of the line-item discount before it in the discount order. |
> | [Discount type](#discount-types-how-a-line-item-discount-reduces-the-charge) | The discount type decides whether a line-item discount applies before or after Zenskar calculates the charge. |
> | | [Percentage discount](#percentage-discounts-a-share-of-the-charge): A percentage discount reduces the charge after Zenskar calculates it. |
> | | [Fixed-amount discount](#fixed-amount-discounts-an-amount-in-each-discount-cadence): A fixed-amount discount reduces the charge after Zenskar calculates it, by an amount in each discount cadence. |
> | | [Discount cadence](#fixed-amount-discounts-an-amount-in-each-discount-cadence): A fixed-amount discount and a quantity discount each have one discount cadence. |
> | | [Quantity discount](#quantity-discounts-free-units-in-each-discount-cadence): A quantity discount reduces the quantity before Zenskar calculates the charge. |

> [accordion] Related modules
>
> Line-item discounts use the following modules:
>
> | Module | Details |
> | - | - |
> | [Products](https://zenskar.com/docs/20260301/zenskar-modules/products/concepts/products.md#pricing-presets-how-you-charge) | A line-item discount cannot overlap a pricing version whose pricing preset uses the dimensional pricing model. |
>
> The following modules use line-item discounts:
>
> | Module | Details |
> | - | - |
> | Invoices | The line-item discounts of a line item reduce the charges of its invoice line items. |

## Line-item discounts: what reduces the charge of a line item

A **line-item discount** is a reduction to the charge of a [line item](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#line-item) for a range of dates.

A line item can have several line-item discounts, each with its own dates within the [line-item duration](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#line-item-duration). The dates of two line-item discounts can overlap.

Line-item discounts and [line-item minimum commitments](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#line-item-minimum-commitment) apply in a fixed sequence. See [Discount types compared](#discount-types-compared).

A [contract](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#contract) can also have a [contract-level discount](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#contract-level-discount), which applies after the line-item discounts. See [Line-item and contract-level discounts compared](#line-item-and-contract-level-discounts-compared).

The dates of a line-item discount cannot overlap a [pricing version](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#pricing-version) whose [pricing preset](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#pricing-preset) uses the [dimensional pricing model](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#dimensional-pricing-model).

## Discount order: which line-item discount applies first

The **discount order** is the position of a line-item discount in the sequence in which Zenskar applies the line-item discounts of a line item.

Zenskar applies the line-item discounts of a line item one after another, lowest discount order first. Each line-item discount applies to the result of the one before. Each discount order is unique within a line item. [Quantity discounts](#quantity-discounts-free-units-in-each-discount-cadence) apply in a sequence of their own, before Zenskar calculates the charge. See [Discount types compared](#discount-types-compared).

The discount order changes the result. For example, a line item charges \$1,000 for a month, with two line-item discounts: 10% and \$100:

| Discount order | Calculation | Charge |
| - | - | - |
| 10% first, then \$100 | \$1,000 − 10% = \$900, then \$900 − \$100 | \$800 |
| \$100 first, then 10% | \$1,000 − \$100 = \$900, then \$900 − 10% | \$810 |

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 have two [line-item discounts](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#line-item-discount): 10% off until June, and USD 50 off each month from April to June. The two line-item discounts overlap from April to June, where they apply in their [discount order](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#discount-order): first the 10%, then the USD 50. Dedicated servers have no line-item discounts.

```mermaid theme={null}
gantt
  title Line-item discounts in the example
  dateFormat YYYY-MM-DD
  axisFormat %b
  section Seats
  Line-item duration of seats                         :2027-01-01, 2027-12-31
  Line-item discount of seats, 10% off, order 1       :2027-01-01, 2027-06-30
  Line-item discount of seats, USD 50 off, order 2    :2027-04-01, 2027-06-30
```

This conceptual diagram shows two line-item discounts of one line item in the example, which overlap and apply in their discount order.

## Discount types: how a line-item discount reduces the charge

A **discount type** is the kind of reduction that a line-item discount makes: a percentage of the charge, a fixed amount, or a number of free units.

Each line-item discount has one discount type. The discount type decides what the line-item discount reduces, and whether it applies before or after Zenskar calculates the charge.

### Percentage discounts: a share of the charge

A **percentage discount** is a line-item discount or a contract-level discount that reduces a charge by a percentage.

A percentage discount applies to the charge of each [billing period](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#billing-period). For example, a percentage discount of 15% reduces a charge of \$1,000 to \$850.

### Fixed-amount discounts: an amount in each discount cadence

A **fixed-amount discount** is a line-item discount or a contract-level discount that reduces a charge by an amount of money in each [discount cadence](#fixed-amount-discounts-an-amount-in-each-discount-cadence).

A **discount cadence** is how often the amount of a fixed-amount discount, or the free units of a [quantity discount](#quantity-discounts-free-units-in-each-discount-cadence), become available again.

The amount is in the currency of the contract. A discount cadence is a whole number of months or years.

Within each discount cadence, the amount is used up across the billing periods, in date order. What is left at the end of the discount cadence does not carry forward. A fixed-amount discount never reduces a charge below zero.

For example, a fixed-amount discount gives \$100 every quarter, and the line item is billed monthly:

| Month | Charge before the fixed-amount discount | Fixed-amount discount | Charge after the fixed-amount discount | Amount left |
| - | - | - | - | - |
| January | \$60 | \$60 | \$0 | \$40 |
| February | \$80 | \$40 | \$40 | \$0 |
| March | \$70 | \$0 | \$70 | \$0 |
| April | \$90 | \$90 | \$0 | \$10 |

In April, a new quarter starts, and the full \$100 is available again.

When the dates of a fixed-amount discount cover only part of a discount cadence, Zenskar either prorates the amount to the part that the dates cover, or gives the full amount.

### Quantity discounts: free units in each discount cadence

A **quantity discount** is a line-item discount that gives a number of free units of a line item in each discount cadence.

Zenskar subtracts the free units from the [quantity](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#quantity) before it calculates the charge. Within each discount cadence, the free units are used up across the billing periods, in date order. Unused free units do not carry forward.

For example, a quantity discount gives 1,000 free API calls every month. A customer makes 1,500 calls in a month. Zenskar charges for 500 calls.

When the dates of a quantity discount cover only part of a discount cadence, Zenskar either prorates the free units to the part that the dates cover, or gives all the free units. Zenskar rounds a prorated number of free units down to a whole unit.

### Discount types compared

| Discount type | Reduces | Applies | Discount cadence |
| - | - | - | - |
| Percentage discount | The charge, by a percentage | After Zenskar calculates the charge | None |
| Fixed-amount discount | The charge, by an amount of money | After Zenskar calculates the charge | Yes |
| Quantity discount | The quantity, by a number of free units | Before Zenskar calculates the charge | Yes |

Zenskar applies the line-item discounts and the line-item minimum commitments of a line item in this sequence:

1. A [minimum-quantity commitment](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#minimum-quantity-commitment) raises the quantity to its minimum.
2. Quantity discounts reduce the quantity, in discount order.
3. Zenskar calculates the charge from the quantity that is left.
4. A [minimum-spend commitment](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#minimum-spend-commitment) raises the charge to its minimum.
5. Percentage discounts and fixed-amount discounts reduce the charge, in discount order.

The discount order decides the sequence only within each group of line-item discounts. A quantity discount always applies before a percentage discount or a fixed-amount discount, whatever their discount orders.

For example, a line item charges \$1 for each API call. A customer makes 1,500 calls in a month. The line item has a percentage discount of 10% with discount order 1, and a quantity discount of 1,000 free calls with discount order 2:

| Step | Calculation | Result |
| - | - | - |
| Quantity discount | 1,500 calls − 1,000 free calls | 500 calls |
| Charge | 500 calls × \$1 | \$500 |
| Percentage discount | \$500 − 10% | \$450 |

The quantity discount applies first, although its discount order is higher.

See [Add a line-item discount](https://zenskar.com/docs/20260301/zenskar-modules/contracts/how-to-guides/discounts.md#add-a-line-item-discount).

## Line-item and contract-level discounts compared

| | [Line-item discount](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#line-item-discount) | Contract-level discount |
| - | - | - |
| Where you set it | On a line item | On the contract |
| What it reduces | The charge of one line item | The charges of all or selected products of the contract |
| How many | Several on a line item. Their dates can overlap, and they apply in their discount order. | At most one on a contract. Its [discount versions](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#discount-version) never overlap. |
| Dates | Within the [line-item duration](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#line-item-duration) | Within the [contract duration](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#contract-duration), following the [rules for the start and end dates](https://zenskar.com/docs/20260301/zenskar-modules/contracts/concepts/contract-level-discounts.md#rules-for-the-start-and-end-dates) |
| How it reduces | A [percentage discount](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#percentage-discount), a [fixed-amount discount](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#fixed-amount-discount), or a [quantity discount](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#quantity-discount) | A percentage discount or a fixed-amount discount |
| When it applies | A quantity discount before the price. A percentage discount or a fixed-amount discount after the price and the minimum-spend commitment. | After the line-item discounts, before the [contract-level minimum commitment](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#contract-level-minimum-commitment). See [The order of calculation](https://zenskar.com/docs/20260301/zenskar-modules/contracts/concepts/contract-level-discounts.md#the-order-of-calculation). |
| Discount cadence of a fixed-amount discount | You choose it, in months or years | The [billing cadence](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#billing-cadence) of the [covered products](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#covered-product) |
| Amount of a fixed-amount discount in a discount cadence | Used up across the billing periods of the line item, in date order | Split among the charges of the covered products, in proportion to the charges |


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