commet
Commet Integration
Commet is an all-in-one billing and payments platform. Merchant of Record handling taxes, compliance, refunds, and payouts. Integrate with a few lines of code.
Packages
| Package | Purpose | Install |
|---|---|---|
@commet/node |
Core SDK - customers, subscriptions, usage, seats, features, portal, webhooks | npm i @commet/node |
@commet/next |
Next.js helpers - webhook handler, customer portal, pricing markdown | npm i @commet/next |
@commet/ai-sdk |
Vercel AI SDK middleware - automatic AI token usage billing | npm i @commet/ai-sdk |
@commet/better-auth |
Better Auth plugin - auto customer sync, auth-scoped billing | npm i @commet/better-auth |
@commet/cli |
CLI - login, link, pull types, scaffold projects from templates | npm i -g @commet/cli |
Quick Start
import { Commet } from "@commet/node";
More from commet-labs/commet-skills
ai-billing
Use when billing for AI model token usage — setting up @commet/ai-sdk tracked() middleware, configuring balance consumption model plans with AI model pricing, tracking input/output/cache tokens, cost calculation with margins, or building AI products that need usage-based billing.
22commet-webhooks
Use when setting up Commet webhook endpoints, verifying signatures, handling billing events (subscription.created, subscription.activated, subscription.canceled, subscription.updated, payment.received, payment.failed, invoice.created), or building event-driven billing workflows.
20billing-behaviors
Commet behavior rules and business logic. Use when implementing billing features, subscription changes, plan changes, proration, pricing, credits, balance, intro offers, or any billing edge case. Contains detailed rules for how changes affect customers.
20commet-cli
Use when working with the Commet CLI -- logging in, linking projects, pulling types for autocomplete, scaffolding new projects from templates (fixed, seats, metered, credits, balance-ai, balance-fixed), or managing organizations.
18