Skip to main content
Graduated pricing splits usage into tiers, and each tier is charged at its own rate. This means the price per unit decreases as usage increases — customers pay less per unit for higher volumes, but each range has its own rate.
Example
An API service charges:
  • First 1,000 requests: $0.01 each
  • Next 9,000 requests (1,001–10,000): $0.008 each
  • Everything above 10,000: $0.005 each
A customer who makes 15,000 requests pays: (1,000 × 0.01)+(9,000×0.01) + (9,000 × 0.008) + (5,000 × 0.005)=0.005) = **107**

Setting up

Use the tiers array on a plan item price. By default, tiers use graduated behavior:
autumn.config.ts
import { feature, item, plan } from 'atmn';

export const apiCalls = feature({
  id: 'api_calls',
  name: 'API Calls',
  type: 'metered',
  consumable: true,
});

export const pro = plan({
  id: 'pro',
  name: 'Pro',
  price: { amount: 20, interval: 'month' },
  items: [
    item({
      featureId: apiCalls.id,
      reset: { interval: 'month' },
      price: {
        tiers: [
          { to: 1000, amount: 0.01 },
          { to: 10000, amount: 0.008 },
          { to: 'inf', amount: 0.005 },
        ],
        billingMethod: 'usage_based',
        interval: 'month',
      },
    }),
  ],
});
Push changes with atmn push.

How graduated pricing works

At the end of the billing period, Autumn calculates the total charge by applying each tier’s rate to the usage that falls within that tier’s range:
Usage rangeRateCharge
0 – 1,000$0.011,000 × 0.01=0.01 = 10
1,001 – 10,000$0.0089,000 × 0.008=0.008 = 72
10,001+$0.0055,000 × 0.005=0.005 = 25
Total$107
Each tier’s rate only applies to the usage within that tier’s range. This is in contrast to volume-based pricing, where a single rate is applied to the entire usage.

Tier configuration

Each tier has the following fields:
FieldTypeDescription
tonumber or "inf"The upper boundary of this tier. Use "inf" for the final tier.
amountnumberPrice per unit within this tier
flat_amountnumberOptional flat fee added when this tier is reached
Tiers must be in ascending order by to. The final tier should always use "inf" to capture all remaining usage.

Graduated vs volume-based

GraduatedVolume-based
Rate appliedEach tier at its own rateEntire usage at a single rate
Total chargeSum of each tier’s chargeTotal usage × matching tier rate
Best forRewarding growth with lower marginal ratesSimpler pricing with volume discounts
See Volume-Based Tiers for the alternative model.