Manage Customers
Create and manage customers using the Commet SDK and dashboard.
A customer represents the business or person you bill. Each customer can have one active subscription at a time.
Dashboard
Navigate to Customers to view, search, and manage customers. From a customer's detail page you can assign plans, view subscription details, and manage billing.
Create a customer
const { data } = await commet.customers.create({
email: 'billing@acme.com',
id: 'user_123', // optional — your user ID for easy lookup
})
// data.id → 'cus_abc123' (Commet ID)create is idempotent — if a customer with the same id already exists, it returns the existing record.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Billing email |
id | string | No | Your user ID for easy lookup |
fullName | string | No | Customer name |
address | object | No | Billing address (line1, city, postalCode, country) |
metadata | object | No | Custom key-value pairs |
Get a customer
const { data } = await commet.customers.get('cus_abc123')Update a customer
await commet.customers.update({
customerId: 'cus_abc123',
email: 'new@acme.com',
address: { line1: '123 Main St', city: 'Austin', postalCode: '78701', country: 'US' },
})Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
customerId | string | Yes | Commet ID (cus_xxx) or your user ID |
email | string | No | New billing email |
fullName | string | No | Customer name |
timezone | string | No | IANA timezone |
metadata | object | No | Custom key-value pairs |
address | object | No | Billing address (line1, line2, city, state, postalCode, country) |
List customers
Cursor-based pagination. Returns up to 100 customers per page.
const { data, hasMore, nextCursor } = await commet.customers.list({ limit: 25 })To fetch the next page, pass the nextCursor value.
const nextPage = await commet.customers.list({
limit: 25,
cursor: nextCursor,
})Archive a customer
await commet.customers.archive('cus_abc123')Archived customers cannot be reactivated.
Related
How is this guide?