> For the complete documentation index, see [llms.txt](https://docs.bunny.com/guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bunny.com/guide/tour/product-catalog/charges/usage-based-charges.md).

# Usage-based charges

Usage-based, or *metered*, charges are based on a customer's consumption of a service and are not fixed in advance. While recurring charges have the advantage og predictability, usage-based are better suited to service where the consumption is not known in advance, such as text messages sent, API calls made, LLM requests etc.

You can mix both recurring and usage-based charges on a price list. For example, it can be a way to model [committed+overage](/guide/best-practices/committed-+-overage-pricing.md) pricing models.

### Usage calculation type

Bunny can aggregate usage records in three different ways.

* **Average** - The quantity will be the average of all the records recorded in the period.
* **Sum** - The quantity will be the sum of all the quantities of the usage records in the period.
* **Last** - The quantity with be taken from the last record uploaded in the period.
* **Max** - The quantity will be taken form the record with the highest quantity in the period.

<figure><img src="/files/EZuokESTLBEXipvZaOuQ" alt="" width="375"><figcaption></figcaption></figure>

The screenshot above shoes volume-based pricing, but bands pricing can also be a very useful pricing model for usage-based billing models because the numbers are bit easier for the end-user to understand.

### Reporting usage to Bunny

There are two way to report usage records into Bunny. Either you can enter them manually via the [usage table](/guide/tour/billing/usage-records.md) or you can upload them programmatically using [Bunny's API or SDK](https://docs.bunny.com/developer/bunny-sdk/track-usage-for-billing).

Note that it is the platform's responsibility to ensure that usage records are uploaded in time for the bill run and that no duplicates are uploaded.

### Invoice generation

An entity's bill run executes after 8:15 in the morning in the entity's timezone. This gives you approximately 8 hours to ensure that all usage records for the period will be included in the bill run's invoices.

### Using draft invoices to test

Since an account's usage is not fully known until the end of the account's billing period, it can be hard to visualize how the invoice will look. You can always use the invoice preview on the account for to generate a sample invoice.&#x20;

You can also use the **draft invoices** setting on the account to prevent new invoices from being emailed automatically. This allows you to dial in the usage reporting gradually as you get up and running with Bunny. If the process that uploads usage records from your platform to Bunny missed some records, you can regenerate the invoice, verify the correctness of it and then release it to the customer.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.bunny.com/guide/tour/product-catalog/charges/usage-based-charges.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
