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

# Pricing templates

> Replicate popular B2B pricing models with Lago contracts: per-token, hybrid, per-transaction, pay-as-you-go and per-seat templates on the product catalog.

Pricing templates show how to rebuild a well-known pricing model with Lago, from billable metric to contract. Use them as a starting point when your pricing looks like one of these companies' and you bill with contracts.

Each template follows the same flow: billable metric, product, rate card with rates, plan, customer, contract, then events with `external_contract_id`. Code samples use cURL against `/api/v2`. The pricing logic matches the v1 templates, so you can compare both versions side by side.

Legacy (v1): [Pricing templates with subscriptions](https://getlago.com/docs/templates/introduction.md).

## Per-token pricing (AI)

> [card] [Mistral.ai](https://getlago.com/docs/v2/templates/per-token/mistral.md)
>
> Build a transparent per-token pricing like Mistral, the famous AI company,
> with multiple dimensions per model and token type.

> [card] [OpenAI](https://getlago.com/docs/v2/templates/per-token/openai.md)
>
> Replicate OpenAI's per-token pricing, the famous AI company behind GPT
> models, with multiple dimensions based on models and action types.

## Hybrid pricing

> [card] [Segment](https://getlago.com/docs/v2/templates/hybrid/segment.md)
>
> Build a hybrid pricing and billing system like Segment, the CDP leader,
> combining a fixed platform fee with a graduated usage component that grows
> revenue with your users.

## Per-transaction pricing

> [card] [Stripe](https://getlago.com/docs/v2/templates/per-transaction/stripe.md)
>
> Implement a per-transaction pricing model like Stripe, the leading payments
> infrastructure company, including fees based on the total amount and number
> of transactions.

## Pay-as-you-go pricing

> [card] [Algolia](https://getlago.com/docs/v2/templates/payg/algolia.md)
>
> Discover how Algolia, the search and discovery platform, increases
> conversion with commitment-free pricing options that adapt to customers'
> needs.

> [card] [Google BigQuery](https://getlago.com/docs/v2/templates/payg/bigquery.md)
>
> Implement a pay-as-you-go pricing model with a free first tier like Google BigQuery, the data analytics platform.

## Per-seat pricing

> [card] [Notion](https://getlago.com/docs/v2/templates/per-seat/notion.md)
>
> Set up a per-user pricing like Notion, the collaboration software for
> innovative teams, with a prorated price per active user.

> [card] [Contracts vs subscriptions](https://getlago.com/docs/v2/guide/introduction/contracts-vs-subscriptions.md)
>
> How v2 objects map to v1.

> [card] [Your first invoice](https://getlago.com/docs/v2/guide/introduction/your-first-invoice.md)
>
> From product to contract to invoice.


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