Pricing Models
Decision Matrix
| Question |
Metered |
Credits |
Balance |
Seats |
| Is usage predictable? |
No |
Somewhat |
Somewhat |
Yes |
| Need hard limits? |
No |
Yes |
Optional |
N/A |
| Per-user value? |
No |
No |
No |
Yes |
| Multi-feature spend? |
No |
No |
Yes |
No |
| Sub-cent pricing? |
Yes |
No |
Yes |
No |
| Customer wants cost control? |
Low |
High |
Medium |
High |
Quick Comparison
| Model |
Charges When |
Blocks on Limit |
Best For |
| Metered |
Period end (true-up) |
Never |
API calls, bandwidth, storage |
| Credits |
Upfront (blocks) |
Yes, hard stop |
Image generation, exports, compute jobs |
| Balance |
Real-time deduction |
Configurable |
AI token usage, multi-feature platforms |
| Seats |
Period start (advance) + true-up |
N/A |
Team tools, per-user licenses |
| Boolean |
Included in plan base |
N/A |
Feature flags, plan differentiation |
Code Examples
Metered -- Track API usage
import { Commet } from "@commet/node";
const commet = new Commet({ apiKey: process.env.COMMET_API_KEY! });
await commet.usage.track({
customerId: "user_123",
featureCode: "api_calls",
value: 1,
eventId: "usage_abc123",
}, { idempotencyKey: "req_abc123" });
Credits -- Check before consuming
const availability = await commet.usage.check({
featureCode: "image_generations",
customerId: "user_123",
});
if (!availability.allowed) {
// Customer exhausted credits -- prompt to buy a credit pack
const portal = await commet.portal.getUrl({ customerId: "user_123" });
return redirect(portal.portalUrl);
}
await commet.usage.track({
customerId: "user_123",
featureCode: "image_generations",
value: 1,
});
Balance -- AI token billing
import { tracked } from "@commet/ai-sdk";
import { anthropic } from "@ai-sdk/anthropic";
import { generateText } from "ai";
const result = await generateText({
model: tracked(anthropic("claude-sonnet-4-20250514"), {
commet,
feature: "ai_generation",
customerId: "user_123",
}),
prompt: "Explain quantum computing",
});
// Tokens tracked, cost calculated, balance deducted automatically.
Seats -- Manage team members
await commet.seats.add({
customerId: "org_456",
featureCode: "editor",
count: 3,
});
const balance = await commet.seats.getBalance({
customerId: "org_456",
featureCode: "editor",
});
// balance.current = 3
Boolean -- Check feature access
const access = await commet.featureAccess.get({
code: "custom_branding",
customerId: "user_123",
});
if (!access.allowed) {
// Feature not included in their plan
}
Detailed References
| Need |
Reference |
| Choosing between models |
choosing-a-model.md -- Decision framework, real-world examples |
| Metered pricing |
metered.md -- Pay-per-use, overage, included amounts |
| Credit-based pricing |
credits.md -- Block purchases, hard limits, credit packs |
| Balance / prepaid |
balance.md -- Prepaid spend, AI billing, top-ups |
| Seat-based pricing |
seats.md -- Per-user, advance + true-up, seat features |
| Combining models |
hybrid-models.md -- Base + usage, seats + metered, addons |
1---2name: pricing-models3description: Use when choosing a pricing model for a SaaS product — metered (pay per use), credits (block when exhausted), balance (prepaid spend), seats (per-user), or boolean (feature flags). Covers decision frameworks, implementation patterns, and when to use each model.4license: MIT5---67# Pricing Models89## Decision Matrix1011| Question | Metered | Credits | Balance | Seats |12|----------|---------|---------|---------|-------|13| Is usage predictable? | No | Somewhat | Somewhat | Yes |14| Need hard limits? | No | Yes | Optional | N/A |15| Per-user value? | No | No | No | Yes |16| Multi-feature spend? | No | No | Yes | No |17| Sub-cent pricing? | Yes | No | Yes | No |18| Customer wants cost control? | Low | High | Medium | High |1920## Quick Comparison2122| Model | Charges When | Blocks on Limit | Best For |23|-------|-------------|-----------------|----------|24| **Metered** | Period end (true-up) | Never | API calls, bandwidth, storage |25| **Credits** | Upfront (blocks) | Yes, hard stop | Image generation, exports, compute jobs |26| **Balance** | Real-time deduction | Configurable | AI token usage, multi-feature platforms |27| **Seats** | Period start (advance) + true-up | N/A | Team tools, per-user licenses |28| **Boolean** | Included in plan base | N/A | Feature flags, plan differentiation |2930## Code Examples3132### Metered -- Track API usage3334```typescript35import { Commet } from "@commet/node";3637const commet = new Commet({ apiKey: process.env.COMMET_API_KEY! });3839await commet.usage.track({40 customerId: "user_123",41 featureCode: "api_calls",42 value: 1,43 eventId: "usage_abc123",44}, { idempotencyKey: "req_abc123" });45```4647### Credits -- Check before consuming4849```typescript50const availability = await commet.usage.check({51 featureCode: "image_generations",52 customerId: "user_123",53});5455if (!availability.allowed) {56 // Customer exhausted credits -- prompt to buy a credit pack57 const portal = await commet.portal.getUrl({ customerId: "user_123" });58 return redirect(portal.portalUrl);59}6061await commet.usage.track({62 customerId: "user_123",63 featureCode: "image_generations",64 value: 1,65});66```6768### Balance -- AI token billing6970```typescript71import { tracked } from "@commet/ai-sdk";72import { anthropic } from "@ai-sdk/anthropic";73import { generateText } from "ai";7475const result = await generateText({76 model: tracked(anthropic("claude-sonnet-4-20250514"), {77 commet,78 feature: "ai_generation",79 customerId: "user_123",80 }),81 prompt: "Explain quantum computing",82});83// Tokens tracked, cost calculated, balance deducted automatically.84```8586### Seats -- Manage team members8788```typescript89await commet.seats.add({90 customerId: "org_456",91 featureCode: "editor",92 count: 3,93});9495const balance = await commet.seats.getBalance({96 customerId: "org_456",97 featureCode: "editor",98});99// balance.current = 3100```101102### Boolean -- Check feature access103104```typescript105const access = await commet.featureAccess.get({106 code: "custom_branding",107 customerId: "user_123",108});109110if (!access.allowed) {111 // Feature not included in their plan112}113```114115## Detailed References116117| Need | Reference |118|------|-----------|119| **Choosing between models** | [choosing-a-model.md](references/choosing-a-model.md) -- Decision framework, real-world examples |120| **Metered pricing** | [metered.md](references/metered.md) -- Pay-per-use, overage, included amounts |121| **Credit-based pricing** | [credits.md](references/credits.md) -- Block purchases, hard limits, credit packs |122| **Balance / prepaid** | [balance.md](references/balance.md) -- Prepaid spend, AI billing, top-ups |123| **Seat-based pricing** | [seats.md](references/seats.md) -- Per-user, advance + true-up, seat features |124| **Combining models** | [hybrid-models.md](references/hybrid-models.md) -- Base + usage, seats + metered, addons |