Simulacrum

Paywall component

Gate UI and routes with the Paywall component based on subscription plan and trial state.

Usage

Wrap premium sections with the generated <Paywall> component. It reads the current customer record and renders children or a fallback CTA.

tsx
<Paywall requiredPlan="pro" fallback={<UpgradeBanner />}>
  <PremiumDashboard />
</Paywall>

Server checks

Always enforce the same rules in server actions and API routes. Client paywalls are UX only.

Trials

Pass trial end dates into billing context so the paywall can show countdown copy and grace states.

Do not expose entitlement logic only in client bundles. Duplicate checks server-side.