Skip to main content
This template builds hybrid pricing like Segment’s with Lago: a fixed monthly platform fee plus a graduated usage component. Use it when a recurring fee covers base access and usage above an included volume grows revenue with your customers. Legacy (v1): Clone Segment pricing with subscriptions.

Pricing structure

Segment’s Team plan combines a platform fee with usage on monthly tracked users (MTUs), the number of unique users whose data is stored each month.

How it maps to Lago

Get started

1

Set up Lago

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 billable metric

Count unique users per billing period.
Refer to the API reference.
3

Create the products

Create a fixed product for the platform fee. Fixed products reject billable_metric_code.
Create a metered product for MTUs.
Refer to the fixed products and metered products guides.
4

Create the rate cards

The platform fee is billed in advance with a standard rate of $120 per month. Fixed products support standard, graduated and volume only.
MTUs are billed in arrears with a graduated rate. Each tier sets an upper bound with to_value. Do not send from_value. The last tier has to_value: null.
Refer to the API reference and the graduated model.
5

Create a plan and apply the rate cards

Apply the platform fee with one fixed unit:
Apply the MTU rate card:
Refer to the API reference and the plans guide.
6

Create a customer

An existing external_id returns 422 instead of updating the customer. Refer to the API reference to create a customer.
7

Create a contract

Replace __PLAN_CODE__ with segment_team.
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 to create a contract.
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 usage via events

Send one event per tracked user. Repeated user_id values in the same period count once.
Refer to the API reference and the usage ingestion guide.
9

Monitor current usage

Track usage across the contract’s open billing periods.
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 to get current usage.

Worked example

Over one full monthly period, the customer tracks 30,000 unique users. The platform fee is billed in advance for the period. The MTU fee is billed in arrears at the end of the period.

What changed from v1

  • The plan’s subscription fee becomes a fixed product, a rate card with billing_timing: "advance" and a standard rate, applied with units.
  • The v1 template used a 14-day trial. v2 has no trial setting, and rate phases count billing cycles, not days. To offer an introductory price, use plan phases with a rate_override.
  • Events target external_contract_id instead of external_subscription_id.

Fixed products

Price configured quantities without usage events.

Graduated model

Price quantity across tiers.

Plan phases

Introductory pricing measured in billing cycles.

Apply a rate card to a plan (API)

POST /api/v2/plans/{plan_code}/applied_rate_cards