Create a tax
- Dashboard
- API
- Open Settings.
- Open Taxes.
- Click Add.
- Enter a name.
- Enter a unique code.
- Optionally, add a description.
- Enter the tax rate.
- Save.
Assign taxes
Every object below takes atax_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:- Rate Card.
- Plan.
- Customer.
- Billing entity.
Assign a tax to a Rate Card
Tax assignments remain editable after the Rate Card has Rates.- Dashboard
- API
- Open Rate cards.
- Select a Rate Card.
- Click Edit.
- In the tax section, add the tax.
- Save.
Assign a tax to a Plan, customer or billing entity
You can update a Plan’s tax codes after a Contract uses it.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 havestandard_vat (20%) assigned through their Rate Cards.
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.
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.