Skip to main content

Hooks

useSubscription

Fetch a single subscription by ID.
Parameters: Returns: UseQueryResult<Subscription>

useSubscriptions

Fetch a paginated list of subscriptions.
Parameters: Returns: UseQueryResult<PaginatedResponse<Subscription>>

useCreateSubscription

Create a new subscription.

useUpdateSubscription

Update an existing subscription.

useCancelSubscription

Cancel a subscription.

useReactivateSubscription

Reactivate a cancelled subscription (before the period ends).

useSubscriptionPreview

Preview proration for a subscription update.

useAvailablePlans

Fetch available upgrade and downgrade options for a subscription.

usePreviewPlanChange

Preview what a plan change will cost (proration, next invoice, etc.).

useChangePlan

Execute a plan change.

Subscription object