Example
A customer has 500 credits. When their balance drops below 100, Autumn automatically purchases 500 more credits using their saved payment method.
Prerequisites
Auto top-ups require:- A one-off prepaid plan (the top-up plan) that the customer has purchased at least once
- The customer must have a saved payment method on file
Setting up
- CLI
- Dashboard
Auto top-ups are configured per customer, not in Then configure auto top-ups per customer via the API (see below).
autumn.config.ts. First, create a top-up plan:autumn.config.ts
Configuring auto top-ups via API
Set up auto top-ups for a customer by updating their billing controls:Auto top-up configuration
| Field | Type | Description |
|---|---|---|
feature_id | string | The feature to monitor |
enabled | boolean | Whether auto top-up is active |
threshold | number | Balance level that triggers a top-up |
quantity | number | How many units to purchase each time |
purchase_limit | object | Optional limit on how often top-ups can occur |
Purchase limits
To prevent runaway spending, you can set a purchase limit:hour, day, week, month.
How it works
- After every usage event (via
track), Autumn checks the customer’s remaining balance - If the balance falls below the configured
threshold, an auto top-up is triggered - Autumn creates an invoice for the configured
quantityusing the existing prepaid top-up plan - The invoice is charged to the customer’s saved payment method
- The balance is replenished with the purchased amount
Auto top-ups use burst suppression to prevent duplicate purchases when multiple track events happen in quick succession. There’s a 30-second cooldown between top-ups for the same feature.

