Overview
Billing subscriptions enable customers to subscribe to recurring plans on Stripe through Frontier. Subscriptions support trial periods, automatic renewals, and flexible proration policies for plan changes.On Frontier, plans and subscriptions are not weighted and have no inherent hierarchy. There’s no concept of “upgrades” or “downgrades” - all plan changes are handled through proration based on your configuration.
Subscription States
A subscription can have multiple states throughout its lifecycle:| State | Description |
|---|---|
| active | Subscription is currently active and billing |
| trialing | Subscription is in the trial period, not yet billing |
| past_due | Subscription payment is overdue |
| canceled | Subscription has been canceled |
Creating Subscriptions
Subscriptions are created through checkout sessions. Customers initiate a checkout for a specific plan, complete payment, and the subscription is automatically activated.Create Checkout for Subscription
org_id: Organization IDbilling_id: Billing account IDsubscription_body.plan: Plan name or ID to subscribe tosubscription_body.trial_days: Number of trial days (optional, overrides plan default)success_url: URL to redirect after successful paymentcancel_url: URL to redirect if checkout is canceled
Trial Periods
Subscriptions can start with a trial period where customers get full access without being charged:Trial days can be set at the plan level (applies to all subscriptions) or per checkout (overrides plan default).
Listing Subscriptions
Retrieve all subscriptions for a billing account:Canceling Subscriptions
Cancel a subscription to stop future billing:When canceled, subscriptions typically remain active until the end of the current billing period, then transition to canceled state.
Changing Plans
Customers can change their subscription plan at any time. Frontier handles prorations automatically based on your configuration.Update Subscription
plan: New plan ID or nameimmediate: If true, change takes effect immediately; if false, change occurs at next billing cycle
Configuration
Frontier provides various configuration options for subscription management under theplan_change key:
Proration Behavior
Controls how charges are calculated when a customer changes plans mid-cycle:create_prorations: Create proration items for plan changes (recommended)none: No prorations, customer pays full price for new planalways_invoice: Always create an invoice for the proration amount
Immediate Proration
Controls proration when a plan change is immediate (usingimmediate: true):
proration_behavior
Collection Method
Specifies how payments are collected:charge_automatically: Automatically charge the customer’s payment methodsend_invoice: Send an invoice for the customer to pay manually
Subscription Lifecycle
Trial Period (Optional)
Customer gets full access without charges during the trial period. State:
trialingActive Subscription
After trial ends or if no trial, subscription becomes active and billing begins. State:
activeRenewal
Subscription automatically renews at the end of each billing period. Customer is charged for the next period.
Per-Seat Subscriptions
For subscriptions that include products withper_seat behavior, Frontier automatically:
- Counts organization members and updates the subscription quantity
- Applies seat limits if configured in the product
- Prorates charges when users are added or removed
Example: Per-Seat Product
- They’re charged $10 per user per month
- Charges automatically adjust when users are added/removed
- Cannot exceed 25 users (seat_limit)
Starter Credits
Plans can award virtual credits when a subscription starts using theon_start_credits field:
Data Synchronization
Frontier maintains a background syncer that periodically synchronizes subscription data with Stripe to ensure consistency.Sync Process
Update Quantities
For per-seat products, update subscription quantity based on current organization member count.
Synchronized Fields
- State: active, canceled, trialing, past_due
- Timestamps: canceled_at, ended_at, trial_ends_at, period start/end
- Plan ID: Updates subscription plan and appends to plan history
- Quantity: For per-seat subscriptions
Synchronization is thread-safe and uses locking to prevent race conditions during updates.
Metadata
Store custom information with subscriptions using themetadata field:
Best Practices
Use Trials Strategically
Offer trial periods to reduce friction for new customers while giving them time to experience value.
Configure Prorations
Set
proration_behavior to create_prorations for fair billing when customers change plans.Monitor Seat Usage
For per-seat products, monitor member counts and notify customers approaching seat limits.
Award Starter Credits
Use
on_start_credits to give new subscribers credits for trying pay-as-you-go features.Troubleshooting
Subscription Not Activating After Checkout
Ensure Stripe webhooks are properly configured. Frontier relies on webhook events to update subscription states.Per-Seat Quantity Not Updating
Check that:- Product has
per_seatbehavior configured - Background syncer is running (check
refresh_intervalconfig) - Organization member count is correctly calculated
Proration Not Applied
Verifyproration_behavior is set to create_prorations in your billing configuration.
Next Steps
Customers
Learn about billing account management
Entitlements
Check feature access for subscribers
Credits
Implement pay-as-you-go with virtual credits
Products and Plans
Define your pricing structure