> ## 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.

# Line item: discounts

## Line item: discounts

This page explains how the charge of a line item can be reduced for a range of dates, and in what order the reductions apply.

### Map of concepts

| Concept | Details |
| - | - |
| [Discount](#discounts-what-reduces-a-charge) | A line item can carry several discounts, each with its own dates. Discounts apply after the line-item minimum commitments. |
| [Discount order](#discount-order-which-discount-applies-first) | When several discounts apply, the discount order decides which one applies first. Each discount applies to the result of the one before. |
| [Discount type](#discount-types-how-a-discount-reduces-the-charge) | Each discount has one discount type. If the discount type is fixed amount or quantity, the discount has a discount cadence. |

### Related modules

Discounts uses the following modules:

| Module | Details |
| - | - |
| [Contracts](/docs/20260301/product-modules/contracts/concepts/contracts) | Discounts belong to the line items of a contract. |

## Discounts: what reduces a charge

A **discount** is a reduction to the charge of a line item for a range of dates.

A [line item](/docs/20260301/product-modules/contracts/glossary#line-item) can carry several discounts. Each discount has a start date and an end date within the [line-item duration](/docs/20260301/product-modules/contracts/glossary#line-item-duration). The dates of two discounts can overlap. A discount can have an optional label.

Discounts belong only to the line items of a [contract](/docs/20260301/product-modules/contracts/glossary#contract). A [pricing preset](/docs/20260301/product-modules/products/glossary#pricing-preset) does not add discounts to a line item.

Discounts apply after the [line-item minimum commitments](/docs/20260301/product-modules/contracts/glossary#line-item-minimum-commitment) of the line item. A line item whose pricing preset uses the [dimensional pricing model](/docs/20260301/product-modules/products/glossary#dimensional-pricing-model) cannot carry discounts.

## Discount order: which discount applies first

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

Zenskar applies the discounts of a line item one after another, lowest discount order first. Each discount applies to the result of the one before. Each discount order is unique within a line item.

The discount order changes the result. For example, a line item charges \$1,000 for a month, with a discount of 10% and a discount of \$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 |

## Discount types: how a discount reduces the charge

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

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

### Percentage discounts

A **percentage discount** is a discount that reduces the charge of a line item by a percentage.

The percentage is more than 0 and at most 100. For example, a percentage discount of 15% reduces a charge of \$1,000 to \$850.

### Fixed-amount discounts

A **fixed-amount discount** is a discount that reduces the charge of a line item by an amount of money 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, become available again, such as every month.

The amount is in the currency of the contract. The discount cadence of a fixed-amount discount is monthly by default. It can be any length from one day to 10 years.

Within each discount cadence, the amount is used up across the [billing periods](/docs/20260301/product-modules/contracts/glossary#billing-period), 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 discount | Discount | Charge after the 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 a discount cadence is only partly within the dates of the discount, the fixed-amount discount handles the partial period in one of two ways:

| Option | Result |
| - | - |
| Prorate | The amount is proportional to the part of the discount cadence that is active. This is the default. |
| Full | The full amount applies, even when the period is partial. |

### Quantity discounts

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

The number of free units is a whole number. Zenskar subtracts the free units from the quantity before it calculates the charge, and after any [minimum-quantity commitment](/docs/20260301/product-modules/contracts/glossary#minimum-quantity-commitment). The discount cadence of a quantity discount starts with the [billing cadence](/docs/20260301/product-modules/contracts/glossary#billing-cadence) of the line item, or monthly when the line item has none.

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 a discount cadence is only partly within the dates of the discount, the quantity discount handles the partial period in one of two ways:

| Option | Result |
| - | - |
| Prorate | The free units are proportional to the part of the discount cadence that is active. This is the default. |
| Full | All the free units apply, even when the period is partial. |

Prorating can produce a fraction of a unit. The rounding of the free units is one of three options:

| Rounding | Result |
| - | - |
| Floor | Rounds down. This is the default. |
| Ceil | Rounds up. |
| Half up | Rounds to the nearest whole unit. A half rounds up. |

### 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 discounts of a line item in two groups, one on each side of the charge calculation:

1. Quantity discounts reduce the quantity, in discount order.
2. Zenskar calculates the charge from the quantity that is left.
3. Percentage discounts and fixed-amount discounts reduce the charge, in discount order.

The discount order decides the sequence only within each group. 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.


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