PurchaseGate
SolvaPay SDK / react/src / PurchaseGate
Variable: PurchaseGate
constPurchaseGate:React.FC<PurchaseGateProps>
Defined in: packages/react/src/components/PurchaseGate.tsx:23
Headless Purchase Gate Component
Controls access to content based on purchase status. Uses render props to give developers full control over locked/unlocked states.
Example
<PurchaseGate requirePlan="Pro Plan">
{({ hasAccess, loading }) => {
if (loading) return <Skeleton />;
if (!hasAccess) return <Paywall />;
return <PremiumContent />;
}}
</PurchaseGate>