Seat Management
Manage seat-based licenses with the Commet SDK.
Seats are per-user licenses that let you charge based on team size. Commet tracks seat changes and bills them automatically — included seats at the start of the period, additional seats prorated.
Seat components
| Component | Description | Example |
|---|---|---|
| Seat Type | Category of user license | editor, admin, viewer |
| Count | Number of seats to add, remove, or set | 5, 10, 50 |
| Billing | Seats are billed per unit on the plan | $25/seat/month |
Dashboard
Create seat types from Seats, then Types, then Add seat type. Seat types must be created in the dashboard before use. View current seat balances on each customer's subscription detail page.
Add seats
await commet.seats.add({
customerId: 'user_123',
seatType: 'editor',
count: 5,
})Remove seats
await commet.seats.remove({
customerId: 'user_123',
seatType: 'editor',
count: 2,
})Seats cannot go below zero — removing more than the current count will fail.
Set exact count
Use set when syncing seat counts from your system.
await commet.seats.set({
customerId: 'user_123',
seatType: 'editor',
count: 10,
})Get balance
const balance = await commet.seats.getBalance({
customerId: 'user_123',
seatType: 'editor',
})Pass either a Commet ID (cus_xxx) or your external ID as customerId. One active subscription per customer is required.
Learn more
Related
- Configure Features — Create seat features on your plans
- Manage Plans — Plans that include seat-based pricing
- Manage Subscriptions — Assign plans with initial seats
How is this guide?