Skip to main content
Auto top-ups automatically purchase additional balance for a customer when their usage drops below a configured threshold. This prevents service interruptions for customers who don’t want to manually manage their balance.
Example
A customer on the Standard plan gets 5,000 credits per month. When their balance drops below 500, Autumn automatically purchases 1,000 more credits at $10 using the plan’s one-off prepaid price.

Prerequisites

Auto top-ups require:
  1. A plan with a one-off prepaid item for the feature you want to auto top-up
  2. The customer must have a saved payment method on file

Setting up

Auto top-ups are configured per customer, not in autumn.config.ts. Your plan needs a one-off prepaid item for the feature you want to auto top-up:
autumn.config.ts
The one-off prepaid item ($10 per 1,000 credits) is what Autumn uses to replenish the balance. Configure auto top-ups per customer via the API (see below).

Configuring auto top-ups via API

Set up auto top-ups for a customer by updating their billing controls:

Auto top-up configuration

Purchase limits

To prevent runaway spending, you can set a purchase limit:
This limits the customer to 5 auto top-ups per month. Supported intervals: hour, day, week, month.

How it works

  1. After every usage event (via track), Autumn checks the customer’s remaining balance
  2. If the balance falls below the configured threshold, an auto top-up is triggered
  3. Autumn creates an invoice for the configured quantity using the one-off prepaid price from the customer’s plan
  4. The invoice is charged to the customer’s saved payment method
  5. 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.

Notifications

Subscribe to the billing.auto_topup_succeeded webhook to be notified when a top-up grants credits. The payload includes the granted quantity, the new balance, and the underlying invoice — useful for sending receipts, updating internal ledgers, or reconciling balance after a recharge. Subscribe to billing.auto_topup_failed to monitor auto top-ups that are blocked, declined, or fail before granting balance. The payload includes a machine-readable reason and any available provider error details. Limit-blocked failure webhooks are suppressed per blocking window to avoid duplicate notifications while the same limit remains active.