autumn.config.ts file is the source of truth for your pricing. It exports features and plans using helper functions from the atmn package.
autumn.config.ts
atmn push, or pull existing config with atmn pull.
Features
Features define what can be gated, metered, or billed in your app.feature(config)
Unique identifier used in API calls (
check, track, etc).Display name shown in the dashboard and billing UI.
"boolean" | "metered" | "credit_system"Required for
metered features.true— usage is consumed (messages, API calls, credits)false— usage is ongoing (seats, storage, workspaces)
Required for
credit_system features. Maps metered features to credit costs.Each entry: { metered_feature_id: string, credit_cost: number }Feature types
Boolean — simple on/off flag:Plans
Plans combine features with pricing to create your subscription tiers, add-ons, and top-ups.plan(config)
Unique identifier used in checkout and subscription APIs.
Display name shown in pricing tables and billing.
Base subscription price:
amount: number— price amount (eg,20for $20)interval: string—"month"|"quarter"|"semi_annual"|"year"|"one_off"
Array of
planFeature() objects defining what’s included.Automatically assign this plan to new customers. Typically used for free plans.
Allow this plan to be purchased alongside other plans (instead of replacing them).
Free trial before billing starts:
duration_length: number— eg,14duration_type: string—"day"|"month"|"year"card_required: boolean— whether a card is needed to start the trial
Group related plans together. Plans in the same group replace each other on upgrade/downgrade.
Plan features
Plan features define what each plan includes — usage limits, pricing, and billing behavior.planFeature(config)
The
id of the feature to include.Amount included for free. Omit for boolean features.
Grant unlimited usage of this feature.
How often the included amount resets:
interval: string—"hour"|"day"|"week"|"month"|"quarter"|"semi_annual"|"year"interval_count: number— defaults to1
Pricing for usage beyond the included amount. See pricing patterns below.
How to handle mid-cycle quantity changes:
on_increase:"prorate"|"charge_immediately"on_decrease:"prorate"|"refund_immediately"|"no_action"
Carry unused balance forward:
max: number— maximum rollover amountexpiry_duration_type:"month"|"forever"expiry_duration_length: number— ignored if type is"forever"
Pricing patterns
Theprice object on a plan feature supports different billing models:
Usage-based — charge based on actual usage:
Price fields
Price per
billing_units. Mutually exclusive with tiers.Tiered pricing. Each entry:
{ to: number | "inf", amount: number }. Mutually exclusive with amount."usage_based" | "prepaid""week" | "month" | "quarter" | "semi_annual" | "year". Omit for one-time charges. Not needed if the plan feature has a top-level reset.Units per price. Eg, $5 per 100 credits =
amount: 5, billing_units: 100.Maximum quantity that can be purchased.
Full example
A complete config with a free plan, a paid plan with a trial, and a credits top-up add-on:autumn.config.ts

