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

# Flat-fee pricing

## Concepts

**Flat-fee pricing** is the simplest model in Zenskar. It involves charging a fixed, recurring, or one-time amount regardless of how much the customer uses the service. This model provides maximum predictability for both the vendor and the customer.

### The logic of dimensions

Flat-fee pricing is a **0-dimensional** model. It depends on zero external factors; it is a mathematical constant.

Think of this as **"The anchor."** In a world of shifting usage and complex variables, the flat fee remains stationary. It does not move based on volume, attributes, or transaction values. It serves as a solid foundation for a contract, ensuring a baseline of revenue regardless of activity.

### SaaS example: Cloud log storage

A monitoring platform offers a "Platform access fee" that grants the user the right to use the dashboard and storage infrastructure. This fee is the same whether they store 1 GB or 1,000 GB.

| Base feature        | Fixed fee (*c*) |
| ------------------- | --------------- |
| **Platform access** | \$500.00        |

**The "Anchor" calculation:**
Because there are no variables to consider, Zenskar simply applies the constant value defined in the product.

| Input metric (*q*) | Pricing logic     | Final bill (*P*) |
| ------------------ | ----------------- | ---------------- |
| **1,500 GB**       | Constant: *P = c* | **\$500.00**     |

***

## Get started

To implement flat-fee pricing, you must first define the product in your library.

1. **Navigate to the Library:** Go to **Contracts** > **Products**.
2. **Create a Standalone Product:** Click **+ CREATE NEW** and choose Standalone Product from the dropdown. The Create Standalone Product page will appear. Fill in the required details and click **Save & Proceed** at the bottom right.
3. **Open Price Details:** You will be redirected to the Price Details page. Click **+ Add Price** to configure pricing for the product.
4. **Select Flat Fee Pricing Model:** In the Pricing Model dropdown, select **Flat Fee**.
5. **Add Price Details and Save:** Fill in the required details and click **Confirm**. Once complete, click **Done** on the Price Details page to finalize the setup.

***

## How-to: Add a flat-fee product to a contract

### 1. Via Contracts

1. Open the target contract in **Contracts** > **Contracts**.

2. In the Summary tab, click **+ ADD PRODUCT V3**.

3. Search for and select your configured flat-fee product.

4. Click **ADD PRODUCT**. You will be redirected to the Summary page. Click **Publish**.

### 2. Via Customer

1. Open the target customer in **Customers**.
2. Go to Contracts and click **+ CREATE CONTRACT**.
3. In the Summary tab, click **+ ADD PRODUCT V3**.
4. Search for and select your configured flat-fee product.
5. Click **ADD PRODUCT**. You will be redirected to the Summary page. Click **Publish**.

<Callout icon="🚧" theme="warn">
  Constraint: You can attach only one pricing model to a single product instance.
</Callout>

***

## Reference

### Technical specifications

| Attribute              | Specification                                                                                                              |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| **Dimensionality**     | **0-dimensional (constant)**                                                                                               |
| **Math formula**       | *P = c* (where *c* is a fixed constant)                                                                                    |
| **Logic type**         | **Constant function**: The output is independent of any input variable.                                                    |
| **Boundary behavior**  | **N/A**: No thresholds or ranges exist for this model.                                                                     |
| **Calculation engine** | **Direct resolution**: The engine retrieves the constant  from the product definition and applies it to the billing cycle. |
| **Data object**        | `pricing_model_type: flat_fee_pricing`                                                                                     |

### System architecture

In Zenskar, all pricing models are governed by a hierarchical relationship between entities:

* **Contract:** The legal agreement between you and your customer.
* **Phase:** A specific time-bound period (e.g., Q1, implementation phase) within that contract.
* **Product:** The actual service or software module being sold.
* **Pricing model:** The specific logic (flat-fee pricing) that defines how that product is billed.

**Entity hierarchy:**

```mermaid theme={null}
flowchart LR
    CONTRACT[Contract] ---|"has one or more"| PHASE[Phase]
    PHASE ---|"has one or more"| PRODUCT[Product]
    PRODUCT ---|"has exactly one active"| PRICINGMODEL[Pricing model]

style PRICINGMODEL fill:#90ee90

```

### Price resolution flow

The following flow describes how flat-fee pricing calculates the final price:

1. **Product library:** Defines the global flat fee (*c*) and the billing frequency.
2. **Contract:** Links the product to a customer.
3. **Billable metric:** Does not require usage data (*q*); the value is pulled from the product definition itself.
4. **Billing engine:** Bypasses usage aggregation and directly injects the constant  as a line item on the invoice.

***

<br />
