- Grant the customer access to the features in the plan
- If the plan has prices, generate a checkout URL for payment
Basic Usage
Callbilling.attach to attach a plan to a customer. This always returns a paymentUrl that the customer should be redirected to.
Default behavior:
- New subscriptions:
paymentUrlpoints to Stripe Checkout for payment collection - Plan changes (upgrades/downgrades):
paymentUrlpoints to Autumn Checkout where the customer can review prorations before confirming
- Upgrades happen immediately with prorated charges
- Downgrades are scheduled for the end of the current billing cycle
Building Your Own Checkout UI
Autumn’s checkout page is designed to get you off the ground quickly, but often you’ll want full control over the styling and user experience. For plan changes, you can build your own checkout UI using a two-step flow:Step 1: Preview the change
Callbilling.previewAttach to see exactly what will be charged before making any changes. This returns line items, totals, and next cycle information that you can display in your own UI.
Step 2: Execute the change
Once the customer confirms, callbilling.attach with redirectMode: "if_required". This will:
- Charge the customer automatically if they have a payment method on file
- Return a Stripe Checkout URL only if no payment method exists (for new customers)

