autumn-billing-page

Builds billing pages with subscription management, usage balances, and plan switching using Autumn SDKs.

2.7k|244|Updated Jan 21, 2025
One-click install
npx skills add https://github.com/useautumn/autumn --skill autumn-billing-page
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: autumn-billing-page
Source: https://github.com/useautumn/autumn/tree/main/packages/atmn-tests/.claude/skills/autumn-billing-page
Command: npx skills add https://github.com/useautumn/autumn --skill autumn-billing-page

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Building a customer-facing billing page requires wiring together subscription status, usage balances, plan upgrades and downgrades, cancellations, and Stripe portal access. This Skill provides ready-to-use patterns for implementing all of these with the Autumn billing layer, in React, TypeScript, or Python.

Core Features & Use Cases

  • Subscription & Plan Display: Show active plans, subscriptions, and one-off purchases, plus usage balances with granted, used, and remaining amounts.
  • Pricing Page with Eligibility: List plans with per-customer eligibility (upgrade, downgrade, current plan, trial availability) and wire attach buttons for plan switching.
  • Lifecycle Management: Cancel, uncancel, open the Stripe billing portal, render usage history charts, and sell prepaid top-ups.
  • Use Case: A SaaS team needs a billing settings page where users can see their current plan, check remaining message credits, upgrade to Pro, or cancel at end of cycle. This Skill generates each component using autumn-js hooks or SDK calls.

Quick Start

Ask the AI to build a billing page for your app using Autumn, showing the current plan, usage balances, and upgrade and cancel buttons.

Frequently Asked Questions about autumn-billing-page

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a pricing page with upgrade and downgrade buttons?

List plans with a customerId so each plan includes a customerEligibility object indicating whether attaching it is an upgrade, downgrade, or current plan. Then call attach with the planId when the user clicks the button, which handles the switch automatically.

How do I show a customer's remaining usage balance with Autumn?

Fetch the customer with useCustomer in React or autumn.customers.getOrCreate in the SDK, then read the balances object for the feature. Each metered feature exposes granted, usage, and remaining fields you can render directly.

Does Autumn support React, TypeScript, and Python?

Yes. React apps use hooks like useCustomer, useListPlans, and useAggregateEvents from autumn-js/react. Backend integrations use the Autumn TypeScript client or the Python autumn_sdk package with equivalent methods.

How do I cancel or uncancel a subscription in Autumn?

Call billing.update with the planId and a cancelAction of cancel_end_of_cycle to schedule cancellation. To reverse a pending cancellation, pass cancelAction uncancel while the subscription is still active with a non-null canceledAt.

Can I open the Stripe billing portal from my app?

Yes. Call openCustomerPortal with the customerId and a returnUrl, then redirect the user to the returned URL. The portal must first be enabled in your Stripe settings and lets customers manage payment methods and invoices.

What do I need before using this billing page skill?

You need an autumn.config.ts file in your project root, generated by running npx atmn init after logging in. The skill also detects whether your codebase uses the React AutumnProvider setup or a backend Autumn client to pick the right integration path.