Перейти к содержанию

Monetization Flow

Trigger

Customer upgrades plan or exhausts quota mid-cycle.

Flow

flowchart LR
  A[Admin selects plan] --> B[Billing updates subscription]
  B --> C[Entitlements refreshed]
  C --> D[Quota state recalculated]
  D --> E[Chat and Device enforce limits]
  F[Payment webhook] --> B

Steps

  1. Admin lists plans in Billing UI or API.
  2. Admin changes subscription for org or user subject.
  3. Billing writes entitlements and quota state.
  4. Account /me reflects plan on next profile load.
  5. Chat checks token balance via Spending before/after requests.
  6. Device operations check device/screenshot/tablet limits.
  7. Optional: payment provider webhook updates invoice/subscription status.
  8. Admin opens external billing portal for payment method if integrated.

Outcome

Commercial limits consistently enforced across AI and device domains.

Plan constraints

Defined per plan row: tokens/month, devices, screenshots/day, vision, tablet_minutes, rate limits.

Failure modes

Failure User impact
Webhook delay Temporary mismatch until sync
Downgrade mid-cycle Features lock when quota hits zero
Spending unavailable Chat may fail closed