1
Install
- pnpm
- npm
- yarn
- bun
2
Configure
.env
src/lib/server/commet.ts
3
Subscribe
customers.create is idempotent — if a customer with the same id already exists, it returns the existing record.src/routes/api/billing/subscribe/+server.ts
4
Check Access
src/routes/api/billing/access/[customerId]/+server.ts
5
Track Usage
src/routes/api/billing/usage/+server.ts
6
Customer Portal
src/routes/api/billing/portal/+server.ts