Skip to main content
Your 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
Push changes with atmn push, or pull existing config with atmn pull.

Features

Features define what can be gated, metered, or billed in your app.

feature(config)

string
required
Unique identifier used in API calls (check, track, etc).
string
required
Display name shown in the dashboard and billing UI.
enum
required
"boolean" | "metered" | "credit_system"
boolean
Required for metered features.
  • true — usage is consumed (messages, API calls, credits)
  • false — usage is ongoing (seats, storage, workspaces)
array
Required for credit_system features. Maps metered features to credit costs.Each entry: { meteredFeatureId: string, creditCost: number }

Feature types

Boolean — simple on/off flag:
Metered, consumable — used up and replenished (messages, API calls):
Metered, non-consumable — ongoing usage (seats, storage):
Credit system — maps multiple metered features to credit costs:
If you set the price per credit to 1 cent, credits become monetary credits (eg, 5 credits = $0.05 per premium message).

Plans

Plans combine features with pricing to create your subscription tiers, add-ons, and top-ups.

plan(config)

string
required
Unique identifier used in checkout and subscription APIs.
string
required
Display name shown in pricing tables and billing.
object
Base subscription price:
  • amount: number — price amount (eg, 20 for $20)
  • interval: string"month" | "quarter" | "semi_annual" | "year" | "one_off"
  • additionalCurrencies?: array — amounts in other currencies, eg [{ currency: 'eur', amount: 18 }]
array
Array of item() objects defining what’s included.
boolean
default:"false"
Automatically assign this plan to new customers. Typically used for free plans.
boolean
default:"false"
Allow this plan to be purchased alongside other plans (instead of replacing them).
object
Free trial before billing starts:
  • durationLength: number — eg, 14
  • durationType: string"day" | "month" | "year"
  • cardRequired: boolean — whether a card is needed to start the trial
string
Group related plans together. Plans in the same group replace each other on upgrade/downgrade.

Plan items

Plan items define what each plan includes — usage limits, pricing, and billing behavior.

item(config)

string
required
The id of the feature to include.
number
Amount included for free. Omit for boolean features.
boolean
Grant unlimited usage of this feature.
object
How often the included amount resets:
  • interval: string"hour" | "day" | "week" | "month" | "quarter" | "semi_annual" | "year"
  • intervalCount: number — defaults to 1
object
Pricing for usage beyond the included amount. See pricing patterns below.
object
How to handle mid-cycle quantity changes:
  • onIncrease: "prorate" | "charge_immediately"
  • onDecrease: "prorate" | "refund_immediately" | "no_action"
object
Carry unused balance forward:
  • max: number — maximum rollover amount
  • expiryDurationType: "month" | "forever"
  • expiryDurationLength: number — ignored if type is "forever"

Pricing patterns

The price object on a plan item supports different billing models: Usage-based — charge based on actual usage:
Prepaid — customer buys a fixed quantity upfront:
Tiered — price changes based on usage volume:

Price fields

number
Price per billingUnits. Mutually exclusive with tiers.
array
Tiered pricing. Each entry: { to: number | "inf", amount: number }. Mutually exclusive with amount.
array
Amounts in other currencies. For flat prices: [{ currency: 'eur', amount: 0.09 }] at the price level. For tiered prices, set per tier: { to: 1000, amount: 0.01, additionalCurrencies: [{ currency: 'eur', amount: 0.009 }] }.
enum
required
"usage_based" | "prepaid"
enum
"week" | "month" | "quarter" | "semi_annual" | "year". Omit for one-time charges. Not needed if the plan item has a top-level reset.
number
default:"1"
Units per price. Eg, $5 per 100 credits = amount: 5, billingUnits: 100.
number
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