This article covers
How to use API to get an estimate of the upcoming Invoice that has Metered line items?
How to use API to get an estimate of the upcoming Invoice that has Metered Plan/Addon?
Summary
When you try using Estimate API to get an estimate of an upcoming Invoice or recurring invoice for the subscription, the API response does not consider the ‘Metered Line Items’ because Usages by design were made for postpaid billing and the final value can only be known after the billing period is over.
Solution
When you try using Estimate API to get an estimate of an upcoming Invoice or recurring invoice for the subscription, the API response does not consider the ‘Metered Line Items’
Please note that we don’t show the metered line items in estimate API because usages by design were made for postpaid billing and the final value can only be known after the billing period is over.
However, you can List usages in a certain time period ( filter by usage_date) and multiply by the price to get a fair idea of what to expect.
Related articles and Documentation
https://apidocs.chargebee.com/docs/api/usages?prod_cat_ver=2#list_usages