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