billing-behaviors

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Billing Behavior Rules

计费行为规则

This skill contains the detailed business behavior rules for Commet. Load the specific files you need based on the task.
本技能包含Commet的详细业务行为规则,你可以根据任务需要加载对应的具体文件。

Core Principle

核心原则

Commet does what's fair by default:
Change TypeWhen Applied
Benefits customerImmediately
Hurts customerAt renewal
Benefits customer: More limits (API calls, storage), adding features, more included seats. Hurts customer: Price increase, reduced limits, removing features, fewer included seats.
Commet默认执行公平原则:
变更类型生效时间
对客户有利立即生效
对客户不利续费时生效
对客户有利的变更: 更高额度(API调用、存储)、新增功能、更多包含席位。 对客户不利的变更: 价格上涨、额度下调、功能移除、包含席位减少。

Actors

参与角色

ActorWhere They ActExamples
FounderDashboardChange prices, edit features, deprecate plans
CustomerCustomer PortalUpgrade, downgrade, change billing interval
SystemAutomaticTrial end, payment failure, billing
角色操作场景示例
创始人管理后台(Dashboard)调整价格、编辑功能、弃用套餐
客户客户门户(Customer Portal)升级、降级、变更计费周期
系统自动执行试用结束、支付失败、计费

Decision Tree

决策树

Who makes the change?
├─ FOUNDER (Dashboard)
│   ├─ Benefits customer? → IMMEDIATE
│   └─ Hurts customer? → AT RENEWAL
│   └─ Delete plan/customer? → See references/plan-management.md
└─ CUSTOMER (Portal)
    ├─ Upgrade (more expensive)? → IMMEDIATE + proration
    └─ Downgrade (cheaper)? → AT RENEWAL
Who makes the change?
├─ FOUNDER (Dashboard)
│   ├─ Benefits customer? → IMMEDIATE
│   └─ Hurts customer? → AT RENEWAL
│   └─ Delete plan/customer? → See references/plan-management.md
└─ CUSTOMER (Portal)
    ├─ Upgrade (more expensive)? → IMMEDIATE + proration
    └─ Downgrade (cheaper)? → AT RENEWAL

Detailed Rules

详细规则

Each file covers a specific aspect of billing behavior:
  • references/subscription-changes.md - Upgrades, downgrades, interval changes, proration by consumption model
  • references/pricing-changes.md - Base price, overage, and seat price changes
  • references/feature-changes.md - Limit increases/decreases, boolean features, included seats
  • references/plan-management.md - Deprecating and deleting plans, deleting customers
  • references/intro-offer.md - Introductory offer eligibility, components, plan change behavior
  • references/consumption-models.md - Credits and balance proration, plan changes, cancellation, purchases
  • references/edge-cases.md - Trial pricing, reactivations, payment failures, exhaustion, currency at checkout
每个文件覆盖计费行为的一个特定方面:
  • references/subscription-changes.md - 升级、降级、周期变更、按消费模式计算proration
  • references/pricing-changes.md - 基准价格、超额费用、席位价格变更
  • references/feature-changes.md - 额度上调/下调、布尔型功能、包含席位
  • references/plan-management.md - 弃用和删除套餐、删除客户
  • references/intro-offer.md - 新用户优惠资格、构成、套餐变更规则
  • references/consumption-models.md - Credits与余额proration、套餐变更、取消、购买
  • references/edge-cases.md - 试用定价、重新激活、支付失败、额度耗尽、结算币种

Domain Reference

领域参考

Module-specific knowledge for understanding the codebase:
  • references/domain-billing-engine.md - Billing engine orchestration, calculator resolution, processing flow, invoice line types, monthly resets
  • references/domain-subscriptions.md - Subscription states, creation flow, billing period, currency, trials, pause, cancellation
  • references/domain-plans.md - Plan structure, free vs paid, PlanPrice, PlanFeature, introductory offers, regional pricing
  • references/domain-features.md - Feature types (boolean, metered, seats), feature codes as SDK identifiers
  • references/domain-usage.md - Consumption models (metered, credits, balance), usage events, AI token tracking, subscription balance
  • references/domain-seats.md - Seat billing (advance + true-up), proration, seat types, SDK integration
  • references/domain-customers.md - Customer fields, external ID, address, customer credits, business flow
  • references/domain-plan-groups.md - Plan grouping for upgrades/downgrades, business rules
  • references/domain-addons.md - Addon system, activation/deactivation, billing, consumption model compatibility
  • references/domain-ai-costs.md - AI model catalog, token cost tracking, margin pricing, balance deductions
  • references/domain-promo-codes.md - Promo code system, validation rules, checkout flow, mutual exclusivity with intro offers
用于理解代码库的模块专属知识:
  • references/domain-billing-engine.md - 计费引擎编排、计算器解析、处理流程、发票行类型、月度重置
  • references/domain-subscriptions.md - 订阅状态、创建流程、计费周期、币种、试用、暂停、取消
  • references/domain-plans.md - 套餐结构、免费vs付费、PlanPrice、PlanFeature、新用户优惠、区域定价
  • references/domain-features.md - 功能类型(布尔型、计量型、席位)、作为SDK标识符的功能代码
  • references/domain-usage.md - 消费模式(计量型、credits、余额)、使用事件、AI token追踪、订阅余额
  • references/domain-seats.md - 席位计费(预付+清算)、proration、席位类型、SDK集成
  • references/domain-customers.md - 客户字段、外部ID、地址、客户credits、业务流程
  • references/domain-plan-groups.md - 用于升级/降级的套餐分组、业务规则
  • references/domain-addons.md - 附加组件系统、激活/停用、计费、消费模式兼容性
  • references/domain-ai-costs.md - AI模型目录、token成本追踪、利润率定价、余额扣除
  • references/domain-promo-codes.md - 优惠码系统、校验规则、结算流程、与新用户优惠互斥