Premium feature ✨: Only users with a premium license can activate and use pricing units. Please contact us to get access to Lago Cloud and Lago Self-Hosted Premium.

Create a pricing units

You can create as many pricing units as needed. Please note that once created, a pricing unit can’t be deleted unless you contact us. To create a new pricing unit:
  1. Go to Settings
  2. In the Your organization section, open the Invoices tab
  3. Click Create next to the Pricing units section
  4. Define a name, code, short name, and optionally, an internal description
The short name acts like a currency symbol on invoices. It’s limited to 3 characters (e.g., tks for tokens or cdt for credits).

Associate charges with a pricing unit

Once pricing units are created, you can use them when defining a plan. For now, only charges support pricing units.
  1. Open an existing plan or create a new one
  2. Add a new charge, existing charges can’t be updated
  3. In the charge details, pricing unit is set by default in the plan’s currency
  4. Switch to a pricing unit by selecting one from the dropdown
  5. Set a conversion rate to ensure proper invoicing
  6. Define your charge model based on the selected pricing unit
  7. Optionally, set a spending minimum in the same pricing unit

Current & past usage

Charges defined in pricing units will be calculated and displayed in two ways: in fiat currency (using the conversion rate set at the charge level) and in the pricing unit itself. You’ll find this information in the current and past usage data, where amounts are also shown in pricing units.
{
  "customer_usage": {
    "charge_usage": {
      {
        "pricing_unit_details": {
          "amount_cents": 10,
          "short_name": "CR",
          "conversion_rate": "0.50005"
        }
      }
    }
  }
}

Invoicing behaviour

Even if prices are expressed in pricing units, invoices will always reflect the equivalent fiat currency amount. The invoicing experience mirrors what’s shown in the current and past usage: amounts are displayed in both fiat and the associated pricing unit.
{
  "fee": {
    "pricing_unit_details": {
      "lago_pricing_unit_id": "9fb3ad78-9fb3-4f4e-9e27-304c16db6abb",
      "pricing_unit_code": "credits",
      "short_name": "CR",
      "amount_cents": 100000,
      "precise_amount_cents": "100000.0",
      "unit_amount_cents": 100,
      "precise_unit_amount": "1.0",
      "conversion_rate": "0.50005"
    }
  }
}

Wallet and transactions

Pricing units don’t affect wallet behavior. You can use wallets independently or alongside pricing units, depending on your use case.