JSPM

  • Created
  • Published
  • Downloads 676
  • Score
    100M100P100Q108894F
  • License MIT

Commet SDK for Node.js

Package Exports

  • commet

Readme

@commet/sdk

TypeScript SDK for Commet billing and usage tracking.

Install

npm install @commet/sdk

Quick Start

import { Commet } from '@commet/sdk';

const commet = new Commet({
  apiKey: process.env.COMMET_API_KEY!,
});

// Track usage
await commet.usage.events.create({
  eventType: 'api_call',
  customerId: 'cus_123',
});

// Manage seats
await commet.seats.add('cus_123', 'admin', 5);

// Create customer
const customer = await commet.customers.create({
  legalName: 'Acme Corporation',
  currency: 'USD',
  address: { /* address info */ }
});

Documentation

See docs for complete documentation.