Skip to main content

SubscriptionGate

SolvaPay SDK


SolvaPay SDK / react/src / SubscriptionGate

Variable: SubscriptionGate

const SubscriptionGate: React.FC<SubscriptionGateProps>

Defined in: packages/react/src/components/SubscriptionGate.tsx:23

Headless Subscription Gate Component

Controls access to content based on subscription status. Uses render props to give developers full control over locked/unlocked states.

Example

<SubscriptionGate requirePlan="Pro Plan">
{({ hasAccess, loading }) => {
if (loading) return <Skeleton />;
if (!hasAccess) return <Paywall />;
return <PremiumContent />;
}}
</SubscriptionGate>