Only the sum aggregation type is compatible with the dynamic charge model. If you have a different use case, please reach out to the Lago team for assistance.

Select the dynamic charge model if you calculate the price manually or if prices fluctuate during a billing period (e.g., for SMS APIs, AI models, etc.), and you want to apply a specific total amount per event using the property precise_total_amount_cents.

Let’s take the example of our AI company. You may want to charge a custom price per event. Consider the following list of events:

EventMetricUnitTotal amount
Transaction 1Dedicated Instance7$0.70
Transaction 2Dedicated Instance5$0.55
Transaction 3Dedicated Instance10$2.20

At the end of the period, the invoice will generate one fee of $3.435 (see example bellow).

ItemUnitUnit priceAmount
Dedicated Instance22$0,156818$3.45

To display more detailed information on fees, please refer to the custom invoice grouping or the pay in advance option.

Only the standard & dynamic charge models support the custom invoice grouping.