Skip to main content
When products belong to the same product line, customers can move between them, and Hexclave handles the proration and timing for you.

Switching plans

For example, upgrading from Pro to Enterprise:
app/components/upgrade-button.tsx
Switching plans requires the customer to have a default payment method saved (see Billing & Invoices). The switch happens immediately and the charge is prorated automatically. You cannot switch to an add-on, and a free trial on the destination product is not applied.

Canceling a subscription

cancelSubscription is called on the app instance rather than the user object:
cancelSubscription is immediate for live, processor-backed subscriptions — access ends now. Subscriptions created in test mode or via grantProduct (no processor subscription) are marked to end at the current period end, so access continues until then. Pass subscriptionId when canceling an inline product that has no catalog productId. One-time purchases cannot be canceled; refund them instead.

Reading subscription state

Each subscription product returned by useProducts / listProducts carries a subscription field with the current period end and cancellation state, plus switchOptions listing the other products in the same product line the customer can switch to.