1
Install
- pnpm
- npm
- yarn
- bun
2
Configure
.env.local
lib/commet.ts
3
Create Customer and Subscribe
customers.create is idempotent — if a customer with the same id already exists, it returns the existing record.app/actions/billing.ts
checkoutUrl is null no payment is needed and the subscription is already active.4
Check Access
app/actions/billing.ts
app/actions/features.ts
5
Track Usage
app/actions/usage.ts
6
Customer Portal
app/api/commet/portal/route.ts