What problem does it solve?
Clerk Billing configuration and entitlement checks for subscription-based SaaS can be hard to wire correctly, leading to empty pricing tables, incorrect plan gates, and webhook sync bugs. This Skill provides a practical, end-to-end reference for rendering plan UI, gating access by plans/features, and handling Clerk billing webhook events safely.
Core Features & Use Cases
- Render subscription plans with Clerk’s UI: Use PricingTable to display configured plans and open Clerk’s in-app checkout drawer, including B2B org pricing via for="organization".
- Gate access using entitlement-aware checks: Use has({ plan }) for tier-level gating and has({ feature }) for capability gating, with server-side auth() and client-side useAuth() patterns.
- Synchronize subscription lifecycle via webhooks: Verify webhook signatures with verifyWebhook, branch on Clerk’s dot-camelCase event names, and persist payer + plan + status updates to your database.
- Use cases: building a /pricing page, protecting /dashboard routes for Pro-only access, implementing B2B organization plan checks (orgId + has({ plan: 'org:team' })), and maintaining accurate subscription state in your app after checkout.
Quick Start
Create a PricingTable-backed /pricing page, enable Billing in the Clerk Dashboard → Billing → Settings, then add server-side route gating with has({ plan: 'pro' }) for tier access or has({ feature: 'export' }) for capability access.