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

# Contracts

## Contracts

This document explains what a contract is, how its customer, currency, payment terms, and invoicing config work, what a line item is and how its settings change over time, and how a contract produces invoices.

> **Map of concepts**
>
> | Concept | Details |
> | - | - |
> | | [Contract duration](#contracts-what-you-agree-with-a-customer): Every contract has one contract duration. |
> | | [Contract status](#contracts-what-you-agree-with-a-customer): Every contract has one contract status. |
> | | [Draft contract](#draft-and-active-contracts): A contract with the draft contract status is a draft contract. |
> | | [Active contract](#draft-and-active-contracts): Publishing a draft contract makes it an active contract. |
> | [Payment term](https://zenskar.com/docs/20260301/product-modules/contracts/concepts/payment-terms.md) | A contract has one payment term for each range of dates. |
> | | [Payment-term version](https://zenskar.com/docs/20260301/product-modules/contracts/concepts/payment-terms.md#payment-term-versions): Each payment-term version applies a payment term to one range of dates within the contract duration. |
> | [Invoicing config](#invoicing-configs-increases-after-approval) | A contract has one invoicing config. |
> | [Line item](#line-items-what-the-customer-buys) | A contract has a line item for each product that it charges for. |
> | | [Line-item duration](#line-items-what-the-customer-buys): Each line item has one line-item duration within the contract duration. |
> | | [Version](#line-item-timelines): Each setting of a line item has versions within the line-item duration. |
> | | [Pricing version](https://zenskar.com/docs/20260301/product-modules/contracts/concepts/line-items/pricing.md): The pricing versions of a line item cover its whole line-item duration. |
> | | [Billing version](https://zenskar.com/docs/20260301/product-modules/contracts/concepts/line-items/billing.md): The billing versions of a line item cover each pricing version completely, or not at all. |
> | | [Quantity](https://zenskar.com/docs/20260301/product-modules/contracts/concepts/line-items/quantity.md): Each line item charges for a quantity of its product. |
> | | [Minimum commitment](https://zenskar.com/docs/20260301/product-modules/contracts/concepts/line-items/minimum-commitments.md): A minimum commitment applies to one line item or to several products of the contract. |
> | | [Discount](https://zenskar.com/docs/20260301/product-modules/contracts/concepts/line-items/discounts.md): A line item can have several discounts. |
> | | [Anchor date](https://zenskar.com/docs/20260301/product-modules/contracts/concepts/line-items/anchor-dates.md): A line item can have an anchor date for each range of dates. |
> | [Invoice preview](#invoices-what-a-contract-produces) | An invoice preview shows the invoices that a contract would produce with its current settings. |
> | [Invoice regeneration](#invoices-what-a-contract-produces) | Invoice regeneration recalculates the invoices of an active contract after its settings change. |
>
> A contract belongs to one customer and charges in one currency for its contract duration. A payment term sets when its invoices are due. The invoicing config decides where an increase to an approved period goes. Each line item charges for one product within the contract duration. The pricing, billing, quantity, discounts, and anchor dates of a line item each change on their own dates, as versions. Minimum commitments set the least that the customer pays, on one line item or across the contract. Before publication, the invoice preview shows the invoices that the contract would produce. After publication, the active contract produces invoices. Invoice regeneration recalculates them when the settings of the contract change.

> **Related modules**
>
> Contracts uses the following modules:
>
> | Module | Details |
> | - | - |
> | [Customers](https://zenskar.com/docs/20260301/product-modules/customers/concepts/customers.md) | Each contract belongs to one customer. |
> | [Products](https://zenskar.com/docs/20260301/product-modules/products/concepts/products.md#pricing-presets-how-you-charge) | A line item charges for one product with one of its pricing presets. |
> | [Billable metrics](https://zenskar.com/docs/20260301/product-modules/usage/concepts/billable-metrics.md) | A line item with metered usage gets its quantity from a billable metric. |
> | [Tax configuration](https://zenskar.com/docs/20260301/product-modules/settings/tax-configuration/concepts/tax-configuration.md#served-countries-and-tax-engines) | A contract uses the served countries, tax engines, and tax rates of the business entity of its customer. |

## Contracts: what you agree with a customer

A **contract** is an agreement that records what a customer buys from you, at what price, and for how long. A contract has the following properties:

| Property | Details |
| - | - |
| Customer | Every contract requires a customer. See [Customers and currencies](#customers-and-currencies). |
| Currency | Every contract requires a currency. See [Customers and currencies](#customers-and-currencies). |
| Contract duration | The **contract duration** is the period from the start date to the end date of a contract. Every contract requires a start date and an end date. The end date must be on or after the start date. |
| Name | The name is optional and internal. Customers do not see it. |
| Description | The description is optional and internal. Customers do not see it. |
| Contract status | **Contract status** is the stage of a contract: draft or active. Zenskar sets the contract status when you save or publish the contract. |

### Draft and active contracts

A **draft contract** is a contract that you are still preparing. A draft contract does not produce invoices.

An **active contract** is a contract that you have published. An active contract produces invoices.

| | Draft contract | Active contract |
| - | - | - |
| Details and [line items](#line-items-what-the-customer-buys) | Can change | Can change |
| Currency | Can change | Cannot change |
| Delete | Possible | Not possible |

Publishing a contract saves it and then activates it. A contract needs at least one line item. A [product](https://zenskar.com/docs/20260301/product-modules/products/glossary.md#product) can appear on only one line item of a contract. Activation also requires complete tax settings for every taxed line item. The tax configuration of the [business entity](https://zenskar.com/docs/20260301/product-modules/settings/glossary.md#business-entity) of the customer can therefore affect activation. Zenskar refuses to activate a contract when a [served country](https://zenskar.com/docs/20260301/product-modules/settings/glossary.md#served-country) of the business entity uses a third-party [tax engine](https://zenskar.com/docs/20260301/product-modules/settings/glossary.md#tax-engine) that is not connected. For the same reason, Zenskar refuses to save changes to such an active contract, and it cannot calculate the [invoice preview](#invoices-what-a-contract-produces). See [Tax configuration](https://zenskar.com/docs/20260301/product-modules/settings/tax-configuration/concepts/tax-configuration.md).

> **[Create a contract](https://zenskar.com/docs/20260301/product-modules/contracts/how-to-guides/contracts.md#create-a-contract)**
>
> This guide shows how to create a contract for a customer.

> **[Save and publish a contract](https://zenskar.com/docs/20260301/product-modules/contracts/how-to-guides/contracts.md#save-and-publish-a-contract)**
>
> This guide shows how to save a draft contract or publish it.

## Customers and currencies

Every contract belongs to one customer. The customer cannot change after you create the contract. When you choose a customer for a new contract, Zenskar sets the currency to USD and names the contract after the customer, for example `Acme Corp — Contract`. You can change both before you save.

The currency of a contract decides which products and [pricing presets](https://zenskar.com/docs/20260301/product-modules/products/concepts/products.md#pricing-presets-how-you-charge) the contract can use. A contract offers only the pricing presets in its own currency. The currency can be USD, INR, EUR, GBP, RUB, or BRL.

The currency of a draft contract can change. If the contract already has line items, Zenskar asks you to confirm the change. Zenskar removes the line items when you save the contract details. If you switch back to the previous currency before you save, Zenskar restores the line items. The currency of an active contract cannot change.

## Payment terms: when invoices are due

A contract has a [payment term](https://zenskar.com/docs/20260301/product-modules/contracts/glossary.md#payment-term), which sets when its invoices are due. The payment term can change from a chosen date.

> **[Payment terms](https://zenskar.com/docs/20260301/product-modules/contracts/concepts/payment-terms.md)**
>
> This page explains how a payment term sets the due date of each invoice, and how it changes over time.

## Invoicing configs: increases after approval

An **invoicing config** is the setting that decides how Zenskar invoices an increase to a period whose invoice is already approved. A contract has one invoicing config. By default, it covers the whole contract duration. The invoicing config cannot change after the contract is published.

An increase happens when a change to the contract raises the charge for a period that is already invoiced and approved. Zenskar never changes the approved invoice. The invoicing config decides where the increase goes instead:

| Option | Result |
| - | - |
| Raise a back-dated invoice | Zenskar creates a separate invoice for the increase, dated back to the approved period. This is the default. |
| Add to the next invoice | Zenskar adds the increase to the next scheduled invoice of the customer. |

For example, January is invoiced at \$100, and the invoice is approved. A later change raises January to \$120. With the default, Zenskar creates a separate \$20 invoice dated January. With the other option, the \$20 goes on the February invoice.

> **[Set the invoicing config](https://zenskar.com/docs/20260301/product-modules/contracts/how-to-guides/contracts.md#set-the-invoicing-config)**
>
> This guide shows how to choose where an increase to an approved period goes.

## Line items: what the customer buys

A **line item** is the part of a contract that charges for one product.

Each line item uses one of the pricing presets of its product. A product can appear on only one line item of a contract.

When you add a product to a contract, you also pick one of its pricing presets. The contract offers only the pricing presets in its own currency. When a product has several pricing presets in that currency, the contract marks the [default pricing preset](https://zenskar.com/docs/20260301/product-modules/products/glossary.md#default-pricing-preset).

The **line-item duration** is the period during which a line item charges for its product. A new line item starts with the contract duration. The line-item duration can be shorter. It must stay within the contract duration.

### Line-item timelines

A contract can charge for products that start, stop, and change at different times. The contract duration sets the outer limits. Each line item has its own duration within those limits. Each of its settings can change on its own dates.

A **version** is a setting of a line item that applies to one range of dates within the line-item duration. A change to a setting during the line-item duration creates a new version from the date of the change. The [pricing versions](https://zenskar.com/docs/20260301/product-modules/contracts/glossary.md#pricing-version) of a line item must together cover the whole line-item duration, without gaps or overlaps. The [billing versions](https://zenskar.com/docs/20260301/product-modules/contracts/glossary.md#billing-version) and the [quantity versions](https://zenskar.com/docs/20260301/product-modules/contracts/glossary.md#quantity-version) must cover each pricing version completely. Their dates can change independently of the pricing versions.

For example, a 12-month contract charges for seats from the start, and for priority support from April. The price of seats rises in July. The customer moves from 20 to 25 seats in April.

The price of seats changes in July. The quantity changes in April. The billing does not change. Each setting changes on its own dates. Each stays within the line-item duration.

A setting that covers only part of a pricing version is not valid. For example, if the billing of seats stops at the end of September while the price of USD 22 runs to December, Zenskar rejects the contract.

Settings that apply to the whole agreement stay at the contract level: the customer, the currency, the payment terms, the invoicing config, and [minimum commitments](https://zenskar.com/docs/20260301/product-modules/contracts/glossary.md#minimum-commitment) across products.

A line item has more settings: its pricing, billing, [quantity](https://zenskar.com/docs/20260301/product-modules/contracts/glossary.md#quantity), minimum commitments, [discounts](https://zenskar.com/docs/20260301/product-modules/contracts/glossary.md#discount), and [anchor dates](https://zenskar.com/docs/20260301/product-modules/contracts/glossary.md#anchor-date). Each has its own page. See [Line-item parts](#line-item-parts).

> **[Add products to a contract](https://zenskar.com/docs/20260301/product-modules/contracts/how-to-guides/line-items.md#add-products-to-a-contract)**
>
> This guide shows how to add products to a contract as line items.

## Invoices: what a contract produces

An **invoice preview** is a calculation of the invoices that a contract would produce with its current settings, shown before you save or publish.

The invoice preview updates as the contract changes. It needs a customer, a currency, a contract duration whose start date is before its end date, and at least one line item.

A draft contract produces no invoices. An active contract keeps a list of the invoices that it has produced.

**Invoice regeneration** is the recalculation of the draft and upcoming invoices of an active contract after its settings change.

When you save an active contract, Zenskar starts invoice regeneration in the background. Saving a draft contract does not start it. Invoice regeneration can also start manually. Only one invoice regeneration runs for a contract at a time. A second request follows the run that is already in progress.

Invoice regeneration recalculates the draft and upcoming invoices, together with the charges that they are built from. An increase to a period whose invoice is already approved follows the [invoicing config](#invoicing-configs-increases-after-approval) of the contract.

> **[Preview the invoices of a contract](https://zenskar.com/docs/20260301/product-modules/contracts/how-to-guides/invoices.md#preview-the-invoices-of-a-contract)**
>
> This guide shows how to preview, view, and regenerate the invoices of a contract.

## Line-item parts

Each part of a line item has its own page:

> **[Pricing](https://zenskar.com/docs/20260301/product-modules/contracts/concepts/line-items/pricing.md)**
>
> This page explains the pricing preset that the line item charges with, how the pricing changes during the line item, and price overrides.

> **[Billing](https://zenskar.com/docs/20260301/product-modules/contracts/concepts/line-items/billing.md)**
>
> This page explains how often, and when, Zenskar invoices the line item. If the pricing preset has no billing setting, the line item starts with monthly billing, prepaid.

> **[Quantity](https://zenskar.com/docs/20260301/product-modules/contracts/concepts/line-items/quantity.md)**
>
> This page explains how many units the line item charges for. If the pricing preset has no quantity setting, the line item starts with a fixed quantity of 1.

> **[Minimum commitments](https://zenskar.com/docs/20260301/product-modules/contracts/concepts/line-items/minimum-commitments.md)**
>
> This page explains the least that the customer pays for the line item, or across the contract.

> **[Discounts](https://zenskar.com/docs/20260301/product-modules/contracts/concepts/line-items/discounts.md)**
>
> This page explains the reductions to the charge of the line item.

> **[Anchor dates](https://zenskar.com/docs/20260301/product-modules/contracts/concepts/line-items/anchor-dates.md)**
>
> This page explains the dates that the billing of the line item aligns to.


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