Skip to main content
useSubscriptionStatus is a pure helper hook that converts a raw subscription object into a set of boolean flags. Use it to render status badges, gate features, and decide which actions to show without hardcoding status string comparisons across your components.

Fields

Pass a subscription object (or null/undefined) returned from useSubscription or useSubscriptionList. Every field returns false when the subscription is missing.

Example: status badges

Render a colored badge based on the subscription state.
components/subscription-badge.tsx

Example: gating UI

Conditionally render parts of your app depending on whether the user has an active or usable subscription.
components/feature-gate.tsx

Example: action buttons

Use canRestore, isPaused, and isActive to decide which buttons to display.
components/subscription-actions.tsx
useSubscriptionStatus does not perform any network requests. It is a synchronous helper that derives flags from the subscription object you pass in. You can also use it outside of React by replicating the same logic if needed.