Skip to main content
A tax defines a percentage rate, such as 20% VAT. Create the tax, then assign it to a Rate Card, Plan, customer or billing entity. Creating a tax does not apply it to invoices automatically.

Create a tax

  1. Open Settings.
  2. Open Taxes.
  3. Click Add.
  4. Enter a name.
  5. Enter a unique code.
  6. Optionally, add a description.
  7. Enter the tax rate.
  8. Save.

Assign taxes

Every object below takes a tax_codes array. An empty array clears the assignments.

Which taxes apply

For a Product fee, Lago uses the first nonempty tax assignment in this order:
  1. Rate Card.
  2. Plan.
  3. Customer.
  4. Billing entity.
Lago applies all taxes in the selected set. It does not combine assignments from different levels. Clearing an assignment allows the next level to apply.

Assign a tax to a Rate Card

Tax assignments remain editable after the Rate Card has Rates.
  1. Open Rate cards.
  2. Select a Rate Card.
  3. Click Edit.
  4. In the tax section, add the tax.
  5. Save.

Assign a tax to a Plan, customer or billing entity

You can update a Plan’s tax codes after a Contract uses it.
Plans expose taxes with expands[]=taxes on retrieval. Billing entities expose assigned taxes the same way.

Read taxes on an invoice

This illustrative example covers one full monthly billing period in USD, with no proration, discounts or credits. A monthly service costs USD 100, and 2,000 API calls at USD 0.01 cost USD 20. Both fees have standard_vat (20%) assigned through their Rate Cards.
Each fee returns its own taxes_amount_cents, and expands[]=applied_taxes lists the tax_code, tax_rate and amount_cents applied. On the invoice, taxes_amount_cents is 2400 and total_amount_cents is 14400.

Update or delete a tax

PUT and PATCH both accept partial updates. code can be renamed if no other tax, including a deleted one, uses the new code. DELETE /taxes/{code} returns the tax with a non-null deleted_at. Deleted taxes are no longer listed or retrievable.
Changing a rate or deleting a tax can affect how future fees are taxed for every object that carries it. Review the tax assignments before changing the rate or deleting the tax.

Use a tax provider

To let a tax provider compute taxes, use a tax integration: Anrok, Avalara or Lago EU taxes. When provider tax processing fails, retry taxes on the invoice.

Next steps

Rate cards

Assign taxes to Rate Cards.

Invoices

How taxes appear on invoice totals.

Create a tax (API)

Request and response schema.

Update a rate card (API)

Assign tax_codes to a rate card.