Skip to main content
A fee is a line item that Lago computes from a rate applied to a contract. Use the fee endpoints to trace an invoice amount back to its product, rate card and rate, or to manage fees that are not invoiced yet. A fee can exist before it is attached to an invoice. In that case lago_invoice_id is null. Each fee carries the identifiers of the objects that produced it: Related products, filters and rates can point to deleted catalog records for historical fees.

Amounts

Example

In the running example, 2,000 API calls at $0.01 produce this fee on api_calls_usd: With a 20% tax assigned, taxes_amount_cents is 400 and total_amount_cents is 2400.

List and retrieve fees

  1. Open an invoice from Invoices or from the customer view; and
  2. Review the fee lines in the invoice detail.

Update a fee payment status

payment_status is the only editable field: pending, succeeded, failed or refunded. An invoiced fee cannot be updated and returns 422 invoiced_fee.

Delete a fee

Only uninvoiced fees can be deleted. A fee already attached to an invoice returns 422 invoiced_fee.
Deleting a fee removes a billable amount. It cannot be undone. Check the fee identifier and review the change before you run it in production.

Next steps

Invoices

How fees are grouped and totaled.

Credit notes

Credit a fee on a finalized invoice.

List fees (API)

Filters and response schema.

Update a fee (API)

Change the payment status of an uninvoiced fee.