Example
A notification service charges $1 per 1,000 notifications sent. A customer who sends 5,000 notifications in a month pays $5 at the end of that month.
Setting up
- CLI
- Dashboard
Create a consumable feature with a Push changes with
usage_based price:autumn.config.ts
atmn push.How it works
- A customer’s usage is tracked via the track endpoint throughout the billing period
- Usage first draws down from the included amount (if any) at no charge
- Usage beyond the included amount is overage — billed at the configured rate
- At the end of the billing period, Autumn generates a Stripe invoice for the total overage
Usage-based features allow overage by default. The
check endpoint will return allowed: true even if the customer has exceeded their included balance, as long as a usage-based price is configured.Tracking usage
Track usage as it occurs — Autumn accumulates it over the billing period:Checking access
Check if the customer can use the feature. For usage-based features with overage,allowed is true as long as the feature exists on the customer’s plan:
Combining with free tiers
A common pattern is pairing usage-based pricing with a free plan. Free users are blocked when they exceed their limit, while paying users are billed for overages.| Plan | Over limit | Result |
|---|---|---|
| Free | Yes | Blocked (allowed: false) |
| Pay-as-you-go | Yes | Allowed, billed at end of period |

