Example
An AI platform has a Pro plan at $20/month that includes:A customer selects 3,000 credits and 10 seats. They pay $20 base + $25 for 2,500 extra credits + $35 for 7 extra seats = $80/month.
- API Credits: 500 included for free, then $10 per 1,000 credits per month (consumable)
- Seats: 3 included for free, then $5 per seat per month (non-consumable)
Setting up
- CLI
- Dashboard
Create your features and add them to a plan with Push changes with
prepaid prices:autumn.config.ts
atmn push.How it works
When a plan has prepaid features, customers select a quantity at purchase time. This quantity determines:- How many units are granted as their balance
- How much they’re charged, based on the price and billing units
quantity is the total number of feature units the customer will receive, including any included amount.
Using our example plan:
- A customer selects 3,000 API credits. 500 are included, so they pay for 2,500 → $10 × (2,500 / 1,000) = $25/month for credits.
- The same customer selects 10 seats. 3 are included, so they pay for 7 → $5 × 7 = $35/month for seats.
If you pass a
quantity equal to or less than the included amount, the customer gets the included amount and pays nothing extra for that feature.Passing feature_quantities
When attaching a plan or updating a subscription that contains prepaid features, use the feature_quantities parameter to specify how many units the customer wants.
Attaching a plan
Pass afeature_quantities entry for each prepaid feature on the plan:
Updating a subscription
To change prepaid quantities on an existing subscription, usebilling.update. For example, to add more seats mid-cycle:
Understanding prepaid balances
Once a customer is attached to a plan with prepaid features, their balancebreakdown distinguishes between what was included for free and what was purchased.
Using the plan from our setup, a customer who attaches with 3,000 credits and 10 seats will have: