Skip to main content
Install the Commet Skill so your coding agent can integrate the current SDK and verify its work against the live API contract.
1

Install

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
The customer is redirected to checkout to complete payment. When 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
Usage is aggregated and billed at end of period.
6

Customer Portal

app/api/commet/portal/route.ts