---
title: "Clone Slack's fair per-seat pricing in a simple way"
url: https://getlago.com/blog/clone-slacks-fair-per-seat-pricing-in-a-simple-way
description: "In this article, we explain how to build a per-seat billing system like Slack using Lago."
authors: ["Anh-Tho Chuong"]
tags: ["Product"]
published: 2022-09-30
updated: 2026-03-05
reading_time_minutes: 5
---

# Clone Slack's fair per-seat pricing in a simple way

[Lago](https://getlago.com/) is an open-source billing API that helps engineers implement faster their billing engines. More and more companies, such as Notion or [Slack](https://slack.com/help/articles/218915077-Slacks-Fair-Billing-Policy), are implementing a complex per-seat fair pricing model.

‍

### What is a fair per-seat pricing?

You only make your customers pay for active members and what they really use. Members added or removed during a billing period are pro-rated based on the number of days used.

![Fair seat pricing](https://cdn.prod.website-files.com/63569f390f3a7ad4c76d2bd6/6357e465b25c78124301cb76_6336b5d30ab1d6c805d2e607_1-fair-pricing.png)

‍

The total number of units to be paid at the end of a period depends on the actual number of days really used by the members.

[Lago](https://getlago.com/) has developed a special feature to implement faster than ever this fair pricing policy, called [persistent billable metrics](https://getlago.com/docs/guide/billable-metrics/aggregation-types/overview#persistent-aggregation-types). Let’s try to replicate Slack’s pricing with L[ago](https://getlago.com/)!

‍

### Prerequisites

You can find the main [Lago](https://getlago.com/)repository [here](https://github.com/getlago/lago).

Before we get started, you need to:

1. Install [Docker](https://docs.docker.com/get-docker/) on your machine;
2. Make sure [Docker Compose](https://docs.docker.com/compose/install/) is installed and available (it should be the case if you’ve chosen to install Docker via Docker Desktop);
3. Make sure [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) is installed on your machine; and
4. A cup of tea (or coffee)! ☕️

‍

**💡 We use basic CURL API calls for this demo, but**[**Lago**](https://getlago.com/)**also provides API clients in order to make the implementation process easier.**

‍

### 1. Setting up your Lago billing engine

Start running [Lago](https://getlago.com/) on your own environment. You will have access to the [Lago](https://getlago.com/) API and [Lago](https://getlago.com/) UI (frontend admin panel to perform no-code tasks).

![Code snippet to install Lago](https://cdn.prod.website-files.com/63569f390f3a7ad4c76d2bd6/6357e465b25c7872a401cb84_6336b645a574a1d37179c28d_2-setup.png)

*Run this code in your terminal*

‍

You can now open your browser and go to [http://localhost](http://localhost/) to connect to the application. Lago's API is exposed at [http://localhost:3000](http://localhost:3000/).

If needed, you can override your environment variables ([learn more](https://getlago.com/docs/guide/lago-self-hosted/docker#environment-variables)).

‍

### 2. Creating a persistent billable metric

As our user seats are billed month over month unless you remove a user, we are going to use the [persistent billable metrics](https://getlago.com/docs/guide/billable-metrics/aggregation-types/overview#persistent-aggregation-types), with a **recurring\_count** aggregation. This means that you won’t have to send an event each month for a user who was added a few months ago and who’s still using your product. [Lago](https://getlago.com/) will keep it in your “billing memory” until you remove this user.

![Creation of a billable metric via the API](https://cdn.prod.website-files.com/63569f390f3a7ad4c76d2bd6/6357e465b25c78071701cb7c_6336b6a81e40e97712da1cba_3-bm-code.png)

*Creation of a billable metric via the API*

![List of billable metrics in the app](https://cdn.prod.website-files.com/63569f390f3a7ad4c76d2bd6/6357e465b25c7876ef01cb7d_6336b6daa132032d5cf3edca_4-bm-ui.png)

*List of billable metrics in the app*

‍

It’s useful to emphasize several points here:

- The aggregation property used is the **seat\_id**. [Lago](https://getlago.com/) counts the number of unique **seat\_id** at the end of each billing period; and
- The **recurring\_count** aggregation type enables the creation of a fair per-seat pricing (we’ll talk about the creation of events later).

‍

### 3. Creating a price plan with per-seat charges

To replicate [Slack’s pricing](https://slack.com/pricing), we can focus on building the **Pro plan**, starting at €8.25 per active user if you pay monthly.

![Creation of a plan via the API](https://cdn.prod.website-files.com/63569f390f3a7ad4c76d2bd6/6357e465b25c7858cc01cb7e_6336b7291691542f089bad53_5-plan-code.png)

*Creation of a plan via the API*

![Creation of a charge via the user interface](https://cdn.prod.website-files.com/63569f390f3a7ad4c76d2bd6/6357e465b25c788dd901cb7f_6336b75ea9242e02531a4a69_6-plan-ui.png)

*Creation of a charge via the user interface*

‍

Let’s break down the code written above:

- The Pro plan has no base subscription amount. Therefore, **amount\_cents** is set to 0 for the plan;
- The **amount\_currency** is in EUR. But you can use any available currency;
- The charges and the plan are paid **in\_arrears**. This means everything is billed based on the consumption of the period; and
- Only one usage-based charge is created. Each seat is priced €8.25 per full month. Pro-rated charges will be determined by the events sent to [Lago](https://getlago.com/).

‍

### 4. Create a customer and assign the Pro plan

First, let’s create a customer using the API. As Airbnb is a power customer of Slack, we can take this company as an example.

![Creation of a customer via the API](https://cdn.prod.website-files.com/63569f390f3a7ad4c76d2bd6/6357e465b25c7845b501cb78_6336b7b147356d7b11086566_7-customer-code.png)

*Creation of a customer via the API*

![List of customers in the app](https://cdn.prod.website-files.com/63569f390f3a7ad4c76d2bd6/6357e465b25c78693b01cb75_6336b7c8a574a1cd0b79db16_8-customer-ui.png)

*List of customers in the app*

‍

Then, we assign the Pro plan to this Airbnb customer.

![Creation of a subscription via the API](https://cdn.prod.website-files.com/63569f390f3a7ad4c76d2bd6/6357e464b25c78c67901cb74_6336b8035b2bce3fcabac120_9-subscription-code.png)

*Creation of a subscription via the API*

![Active subscription in the app](https://cdn.prod.website-files.com/63569f390f3a7ad4c76d2bd6/6357e465b25c78217701cb79_6336b8231691547ae99bb380_10-subscription-ui.png)

*Active subscription in the app*

‍

About the **subscription** request:

- The **external\_id** of the subscription is unique (you can choose your own ID); and
- The assigned plan has an **anniversary** billing time, which means that this Pro plan will be billed on the same day each month, depending on the subscription’s anniversary date (in this case, the 19th of each month).

‍

### 5. Send events to create pro-rated user seats

Each user seat is priced €8.25 for a full month. Let’s send events to get a better understanding of this logic. [Lago](https://getlago.com/) allows you to send [persistent events](https://getlago.com/docs/api-reference/events/event-object):

#### 5.1 User added for full month or persisted from previous billing periods

Use the **operation\_type** called **add** to add a user seat to [Lago’s](https://getlago.com/) billing system.

![Seat 1 added via the API](https://cdn.prod.website-files.com/63569f390f3a7ad4c76d2bd6/6357e465b25c78bb4301cb80_6336b86bc4a07dc1cf6ae696_11-add-seat-code.png)

*Seat 1 added via the API*

![Seat 1 visible in the app](https://cdn.prod.website-files.com/63569f390f3a7ad4c76d2bd6/6357e465b25c78924401cb7a_6336b8945b2bce7618bac3dc_12-add-seat-ui.png)

*Seat 1 visible in the app*

#### 5.2 User added in the middle of the current period

![Seat 2 added via the API](https://cdn.prod.website-files.com/63569f390f3a7ad4c76d2bd6/6357e464b25c78444d01cb73_6336b8ba0ab1d68426d301e0_13-add-seat-other-code.png)

*Seat 2 added via the API*

![Seat 2 added to the current usage](https://cdn.prod.website-files.com/63569f390f3a7ad4c76d2bd6/6357e465b25c780ae501cb81_6336b8e86c05b1d89da9acda_14-add-seat-other-ui.png)

*Seat 2 added to the current usage*

‍

As the user seat is added in the middle of the month, [Lago](https://getlago.com/) automatically creates a pro-rated charge based on the number of days used.

In this example, one user was added for the full month and the other only for half the month.

#### 5.3 User removed in the middle of the current period

A user who’s removed during a period is also charged with a pro-rated amount based on the number of days used. Use the **operation\_type** set to **remove** to remove a user seat during a period.

![Seat removed via the API](https://cdn.prod.website-files.com/63569f390f3a7ad4c76d2bd6/6357e465b25c78f89301cb7b_6336b974822f04be3a74fd3d_15-remove-seat-code.png)

*Seat removed via the API*

‍

### 6. The invoice

Let’s take a closer look at the PDF invoice created by [Lago](https://getlago.com/): it shows the seat history for the billing period under consideration. This detailed invoice provides the information necessary for your customers to understand the billing method.

![Invoice breakdown for per-seat pricing](https://cdn.prod.website-files.com/63569f390f3a7ad4c76d2bd6/6357e465b25c78b19e01cb77_6336b94c40a44640703b1123_16-invoice.png)

*Invoice breakdown for per-seat pricing*

‍

This is how [Lago](https://getlago.com/) can help you implement a per-seat billing system in just a few hours (not months). It’s easy to build but also easy to maintain.
