Skip to main content
Software applications typically ship with a billing page. This allows customers to change plan, cancel subscription and view their usage. The customer endpoint returns the current state of the customer, including their active subscriptions, one-time purchases, and feature balances.

Pricing table

When building a pricing table, you need to know what each plan means for the current customer — is it an upgrade, a downgrade, or their current plan? Is a free trial available? Pass a customerId when listing plans and each plan will include a customerEligibility object:

Switching plans

Switching plans uses billing.attach. See Attaching Plans for the full guide.

Cancelling a plan

Cancel a subscription using billing.update with a cancelAction. See Subscription Lifecycle for the full guide on immediate vs end-of-cycle cancellations.

Uncancelling a plan

If a subscription has a pending cancellation, a scheduled downgrade, or a scheduled plan switch, you can reverse it with cancelAction: "uncancel". A subscription is pending cancellation when canceledAt is not null while the subscription is still active.

Active plans

Display the plan the user is currently on. Users can have multiple active subscriptions and purchases (e.g., main plan and add-ons).
  • subscriptions - Free and paid recurring plans
  • purchases - One-off plans (e.g., credit top-ups)

Usage balances

Metered features have granted, usage, and remaining fields. Use these to display current usage and remaining balance.

Stripe billing portal

The Stripe billing portal lets users manage their payment method, view past invoices, and cancel their plan.
Enable the billing portal in your Stripe settings.

Usage timeseries chart

Autumn provides aggregate time series queries for usage data. Pass the response to a charting library like Recharts.
You can also use the events.list method to get the raw event data and display it in a table.
Next: Deploy to production Once your billing page is in place, go through the production checklist to launch with real payments.

Deploy to production

A checklist to go live with confidence