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

# Clone Notion pricing

> Rebuild Notion's per-seat pricing in Lago with a recurring unique-count metric, a prorated standard rate per active user and a contract.

This template builds per-seat pricing like Notion's Team plan with Lago: a price per active user, prorated by days of use. It suits productivity software, fintechs and data platforms whose price depends on users, cards or integrations that stay active across billing periods.

Legacy (v1): [Clone Notion pricing with subscriptions](https://getlago.com/docs/templates/per-seat/notion.md).

## Pricing structure

| Model | Team plan |
| - | - |
| Price | \$10 per user, billed monthly |

## How it maps to Lago

| Pricing element | Lago object |
| - | - |
| Active users | Billable metric `active_users` (`unique_count_agg` on `user_id`, `recurring: true`) |
| What you sell | Metered product `workspace_seats` |
| \$10 per user, prorated | Rate card `workspace_seats_usd` with `proration: true` and a `standard` rate |
| The offer | Plan `notion_team` |

A recurring unique count metric with `proration: true` supports the `standard` and `graduated` models in arrears, and `standard` in advance.

## Get started

**1. Set up Lago**

```bash cURL theme={"dark"}
LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"
```

Use `https://api.eu.getlago.com` for the EU cluster. API endpoints live under `/api/v2` and require the product catalog to be enabled on your organization.

**2. Create a recurring billable metric**

`recurring: true` carries the value over between billing periods, so a user stays counted until removed.

```bash cURL highlight={6,8-10} theme={"dark"}
curl --location --request POST "$LAGO_URL/api/v2/billable_metrics" \
  --header "Authorization: Bearer $API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "billable_metric": {
      "name": "Active users",
      "code": "active_users",
      "aggregation_type": "unique_count_agg",
      "field_name": "user_id",
      "recurring": true
    }
  }'
```

Refer to the [API reference](https://getlago.com/docs/v2/api-reference/billable-metrics/create.md) and the [billable metrics guide](https://getlago.com/docs/v2/guide/billable-metrics/create-billable-metrics.md).

**3. Create a metered product**

```bash cURL highlight={7-8} theme={"dark"}
curl --location --request POST "$LAGO_URL/api/v2/products" \
  --header "Authorization: Bearer $API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "product": {
      "name": "Workspace seats",
      "code": "workspace_seats",
      "product_type": "metered",
      "billable_metric_code": "active_users"
    }
  }'
```

> [!TIP]
>
> If seats are agreed in the contract instead of tracked from events, use a [fixed product](https://getlago.com/docs/v2/guide/product-catalog/fixed-products.md) and set the seat count with `units` on the applied rate card. Product filters apply only to metered products, so price each seat type as its own fixed product.

**4. Create a prorated rate card**

Set `proration` to `true` on the rate card. The `standard` rate charges \$10 per active user per month.

```bash cURL highlight={10-11,15-18} theme={"dark"}
curl --location --request POST "$LAGO_URL/api/v2/rate_cards" \
  --header "Authorization: Bearer $API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "rate_card": {
      "name": "Workspace seats USD",
      "code": "workspace_seats_usd",
      "product_code": "workspace_seats",
      "currency": "USD",
      "billing_timing": "arrears",
      "proration": true,
      "rates": [
        {
          "code": "seat_standard",
          "effective_from": "2027-01-01T00:00:00Z",
          "rate_model": "standard",
          "rate_properties": { "amount": "10" },
          "billing_interval_count": 1,
          "billing_interval_unit": "month"
        }
      ]
    }
  }'
```

Once a rate exists, structural settings such as `proration` lock. Refer to the [API reference](https://getlago.com/docs/v2/api-reference/rate-cards/create.md) and the [standard model](https://getlago.com/docs/v2/guide/rate-cards/pricing-models/standard.md).

**5. Create a plan and apply the rate card**

```bash cURL highlight={6-7} theme={"dark"}
curl --location --request POST "$LAGO_URL/api/v2/plans" \
  --header "Authorization: Bearer $API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "plan": {
      "name": "Team plan",
      "code": "notion_team",
      "currency": "USD"
    }
  }'
```

```bash cURL highlight={6} theme={"dark"}
curl --location --request POST "$LAGO_URL/api/v2/plans/notion_team/applied_rate_cards" \
  --header "Authorization: Bearer $API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "applied_rate_card": {
      "rate_card_code": "workspace_seats_usd"
    }
  }'
```

Refer to the [API reference](https://getlago.com/docs/v2/api-reference/plan-applied-rate-cards/create.md) and the [plans guide](https://getlago.com/docs/v2/guide/plans/overview.md).

**6. Create a customer**

```bash cURL highlight={6} theme={"dark"}
curl --location --request POST "$LAGO_URL/api/v2/customers" \
  --header "Authorization: Bearer $API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "customer": {
      "external_id": "customer_example",
      "name": "Acme Corp",
      "email": "billing@example.com",
      "currency": "USD"
    }
  }'
```

An existing `external_id` returns `422` instead of updating the customer. Refer to the [API reference](https://getlago.com/docs/v2/api-reference/customers/create.md) to create a customer.

**7. Create a contract**

Replace `__PLAN_CODE__` with `notion_team`.

```bash cURL highlight={6-10} theme={"dark"}
curl --location --request POST "$LAGO_URL/api/v2/contracts" \
  --header "Authorization: Bearer $API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "contract": {
      "external_id": "contract_example",
      "external_customer_id": "customer_example",
      "plan_code": "__PLAN_CODE__",
      "started_at": "2027-01-01T00:00:00Z",
      "billing_anchor_date": "2027-02-01"
    }
  }'
```

The plan supplies the contract's initial applied rate cards. A future `started_at` creates a `pending` contract that becomes `active` on that date. Only one pending or active contract can use a given `external_id` at a time. Refer to the [API reference](https://getlago.com/docs/v2/api-reference/contracts/create.md) to create a contract.

> [!NOTE]
>
> The example dates are in the future. To test right away, set each rate's `effective_from` to today and omit `started_at`, which defaults to now.

**8. Ingest user activity events**

Send an event when a user joins the workspace.

```bash cURL highlight={7-11} theme={"dark"}
curl --location --request POST "$LAGO_URL/api/v2/events" \
  --header "Authorization: Bearer $API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "event": {
      "transaction_id": "__TRANSACTION_ID__",
      "code": "active_users",
      "external_contract_id": "contract_example",
      "properties": {
        "user_id": "user_123",
        "operation_type": "add"
      }
    }
  }'
```

Refer to the [API reference](https://getlago.com/docs/v2/api-reference/events/create.md) and the [usage ingestion guide](https://getlago.com/docs/v2/guide/events/ingesting-usage.md).

**9. Monitor current usage**

Track usage across the contract's open billing periods.

```bash cURL highlight={1} theme={"dark"}
curl --location --request GET "$LAGO_URL/api/v2/contracts/contract_example/current_usage" \
  --header "Authorization: Bearer $API_KEY" \
  --header 'Content-Type: application/json'
```

The response returns `amount_cents`, `taxes_amount_cents`, `total_amount_cents` and a `rate_cards` array with usage per applied rate card. Pending contracts have no usage. Totals can span several invoices, so this is not a preview of one invoice. Filter with `rate_card_code`, `product_code`, `product_filter_code` or `product_type`. Refer to the [API reference](https://getlago.com/docs/v2/api-reference/contracts/retrieve-current-usage.md) to get current usage.

## Worked example

Five users are active for one full monthly period.

| Line | Quantity | Calculation | Amount |
| - | - | - | - |
| Workspace seats | 5 users | 5 × \$10 | \$50.00 |
| **Total before tax** | | | **\$50.00** |

A user added or removed during the period is billed for part of the month, because the rate card has `proration: true`.

## What changed from v1

* The charge's `prorated` setting moves to the rate card's `proration` field.
* The plan has no fixed product, so there is no platform fee.
* Events target `external_contract_id` instead of `external_subscription_id`.

> [card] [Standard model](https://getlago.com/docs/v2/guide/rate-cards/pricing-models/standard.md)
>
> One unit price for every unit.

> [card] [Fixed products](https://getlago.com/docs/v2/guide/product-catalog/fixed-products.md)
>
> Price contractual seat counts with `units`.

> [card] [Contracts](https://getlago.com/docs/v2/guide/contracts/overview.md)
>
> Apply a plan to a customer.

> [card] [Create a rate card (API)](https://getlago.com/docs/v2/api-reference/rate-cards/create.md)
>
> `POST /api/v2/rate_cards`


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