Example
A SaaS tool offers a 14-day free trial of their Pro plan. If the customer doesn’t cancel, billing begins on day 15.
Setting up
- CLI
- Dashboard
Add a Trial duration types:
freeTrial object to your plan:autumn.config.ts
day, month, year.Push changes with atmn push.Card required trials
WhencardRequired is true, the customer must provide payment information to start the trial. Stripe creates a subscription with a trial period — no charge occurs until the trial ends.
Card not required trials
WhencardRequired is false, no checkout is needed. You can attach the plan directly:
autoEnable exists in the same group, it’s activated as a fallback.
Checking trial status
The customer’s subscription includes atrial_ends_at timestamp when a trial is active. You can also expand trials_used to see which trials a customer has consumed:
Trial deduplication
Each customer can only use a plan’s trial once. If they try to attach the same plan again, the trial is skipped and they’re billed immediately. To prevent trial abuse across multiple accounts, set afingerprint when creating a customer (e.g., device ID, browser fingerprint). Autumn checks whether any customer with the same fingerprint has already used the trial.
Custom trials passed via
customize.freeTrial always bypass deduplication. Use this for support cases where you want to grant a second trial.trials_used on the customer object:
Upgrades and Downgrades
When upgrading to a plan with a trial, the trial behavior depends on the customer’s current state and whether the new plan has an unused trial:| Current state | Unused trial? | Result |
|---|---|---|
| Trialing | Yes | Current trial ends. Fresh trial starts on new plan. |
| Trialing | No | Current trial ends. Billing starts immediately. |
| Active (not trialing) | Yes | Trial starts. Current cycle refunded. |
| Active (not trialing) | No | No trial. Billing starts at new price. |
You can override any of these behaviors by passing
customize.freeTrial on the attach call. See Overriding trial behavior below.Overriding trial behavior
You can override the default trial behavior on any/attach or /update-subscription call by passing customize.freeTrial:
- Custom trial
- End / skip trial
- Extend trial
Pass a
freeTrial object to start a trial with a custom duration. This bypasses deduplication — the customer always gets the trial, even if they’ve trialed this plan before.Trials with shared subscriptions
When using entities or add-ons, trial state is shared across the same Stripe subscription. This is because Stripe manages trials at the subscription level. Here are some principles to keep in mind when using trials with shared subscriptions:First entity gets the trial
When the first entity is attached with a trial plan, the trial starts on the shared subscription. Any subsequent entities attached to the same subscription inherit the existing trial state — they don’t start their own independent trial.Adding plans to a non-trialing subscription
If the subscription is not trialing, new plans are charged immediately — even if the product they’re being attached to has a trial configured. The product’s trial config is ignored for merges into an active subscription.Shared trial state affects all plans
Because entities (by default) share a subscription, trial state changes affect all entities:- Entity upgrade to a plan with a trial: a fresh trial starts, and all other entities on the subscription inherit the new trial end date.
- Entity upgrade to a plan without a trial: the trial ends for all entities, and they’re all billed immediately.
- Entity downgrade during trial: the downgrade is scheduled for when the trial ends.
customize.freeTrial on an entity attach or upgrade affects the shared subscription, so all entities are affected. Similarly, passing freeTrial: null ends the trial for all entities on the subscription.
Resetting usage after trial
This feature is coming soon.
transition_rules.reset_after_trial_end with the feature IDs to reset:

