> ## Documentation Index
> Fetch the complete documentation index at: https://getlago.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Percentage rate model

> Calculate a fee as a percentage of a measured monetary amount.

Percentage pricing applies a percentage to a measured monetary amount, such as payment volume. You can also configure a fixed fee per event, free allowances and per-transaction limits.

## How it works

The Product's billable metric measures a monetary base, typically a Sum of an `amount` event property. The Rate applies the percentage in `rate_properties.rate` to that amount. Optional settings add a fixed fee per event, free allowances, and per-transaction minimums and maximums.

Per-event settings can make the result differ from applying the percentage once to the period total. A per-transaction limit is not the same thing as a rate [spending minimum](https://getlago.com/docs/v2/guide/rate-cards/spending-minimums.md), which applies per billing interval.

## Availability

* Fixed Products: not available.
* Metered Products: available with Count, Count unique, Max, Sum and Weighted sum, except when metrics use `recurring: true` with proration. Not available with Latest. Advance billing is available only for Count, non-prorated Count unique and non-prorated Sum.

See the [availability matrix](https://getlago.com/docs/v2/guide/rate-cards/pricing-models/overview.md#model-availability).

## Configure the rate

Set `rate_model` to `percentage`. `rate_properties` takes:

| Field | Description |
| - | - |
| `rate` | Percentage applied to the measured amount, as a decimal string. |
| `fixed_amount` | Fixed fee per event, as a decimal string. |
| `free_units_per_events` | Number of free transactions. |
| `free_units_per_total_aggregation` | Free allowance on the aggregated amount. |
| `per_transaction_min_amount` | Minimum fee per transaction. |
| `per_transaction_max_amount` | Maximum fee per transaction. |

```bash Create a percentage rate theme={"dark"}
LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"

curl --location --request POST "$LAGO_URL/api/v2/rate_cards/payment_volume_usd/rates" \
  --header "Authorization: Bearer $API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "rate": {
      "code": "payments_2_percent",
      "effective_from": "2027-01-01T00:00:00Z",
      "rate_model": "percentage",
      "rate_properties": {
        "rate": "2"
      },
      "billing_interval_count": 1,
      "billing_interval_unit": "month"
    }
  }'
```

## Example

This example uses a metered Product, `payment_volume`, with a Sum metric measuring transaction amounts in USD. Over one full monthly billing period, the customer processes 1,000 USD of transactions. The calculation uses 2%, with no fixed fee, free allowance, transaction limits, proration or spending minimum:

| Measured amount | Rate | Calculation | Amount before tax |
| - | - | - | - |
| 1,000.00 USD | 2% | 1,000.00 USD × 2% | 20.00 USD |

The calculated fee is 20 USD before tax. A `fixed_amount` or per-transaction limits can change the result because those settings apply per event.

## Check the result

Compare the measured monetary amount and percentage with the calculated fee. If you configure per-event options, include those settings and the individual events in your calculation. Use [Contract current usage](https://getlago.com/docs/v2/guide/events/retrieve-usage.md#retrieve-current-usage) to inspect provisional values. See [Rates](https://getlago.com/docs/v2/guide/rate-cards/rates.md#check-which-rate-was-used) to check which Rate applies.

> [card] [Graduated percentage](https://getlago.com/docs/v2/guide/rate-cards/pricing-models/graduated-percentage.md)
>
> Percentage tiers.

> [card] [Pricing models](https://getlago.com/docs/v2/guide/rate-cards/pricing-models/overview.md)
>
> Compare every rate model.

> [card] [Create a rate](https://getlago.com/docs/v2/api-reference/rates/create.md)
>
> `POST /rate_cards/{rate_card_code}/rates`

> [card] [The rate object](https://getlago.com/docs/v2/api-reference/rates/object.md)
>
> `rate_properties` fields.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.