How it works
A spending minimum applies to one Rate for each of its billing periods. A monthly Rate has a minimum per month. A Rate billed every three months has one minimum for the full three-month period. For a partial billing segment, Lago prorates the minimum for that segment and adds a separate true-up fee linked to the usage fee when needed. The minimum applies to that Rate, rather than the customer’s total spending. Percentage pricing also supports per-transaction limits, which apply to individual transactions.Before you start
Spending minimums are available only for Rate Cards billed in arrears, withbilling_timing: "arrears". In arrears means billing at the end of the billing period.
You can set the minimum when creating a Rate or updating a pending Rate. To change the minimum after the Rate becomes active, create a new Rate with a later effective_from.
Set the minimum
Setmin_amount_cents to the minimum amount in cents. It defaults to 0. For a Rate Card priced in USD, min_amount_cents: 3000 sets a minimum of 30 USD.
The example below creates a monthly Rate at 0.01 USD per API call with a 30 USD minimum.
Example
At 0.01 USD per API call, a Rate with a 30 USD minimum produces the following totals for complete billing periods. These totals cover this Rate only, before tax.
For 2,000 calls in one month, the usage fee is 20 USD. Lago adds a 10 USD true-up fee to reach the 30 USD minimum.
For a three-month billing period, the 30 USD minimum applies once to the full period. The 60 USD usage fee already exceeds it, so there is no true-up fee.
Check the result
Compare the usage fee with the minimum for the same Rate and billing period. When the usage fee is below the minimum, check that the true-up fee covers the difference. In the fee response,lago_true_up_parent_fee_id links the true-up fee to its parent fee.
Rates
Manage billing intervals and effective dates.
Pricing models
Choose how a Rate calculates fees.
Create a rate
POST /rate_cards/{rate_card_code}/ratesList fees
GET /fees