packages/payment-core
versioned pricing catalog in a later slice, and until then no checkout,
invoice or entitlement path sells them. Runtime design is in
Mira cloud channels.
Decisions
Approved amounts, metered in integer micro-USD per settled turn:
Billing stays off until the catalog slice ships; until then the runtime
records the meters and the cost in micro-USD
(
mira_usage_daily.cost_micro_usd and weighted_replies) and bills nothing.
Plan shape
Mira managed is a workspace add-on billed per seat, not a renamed personal plan. The personal catalog (d301a-personal-v1) already uses the name Pro for
a $19.99 personal plan, and the approved workspace prices list Pro at $19 a
month;
a $100–$200 Mira tier under the same name would collide in checkout, receipts
and entitlements.
- Seat: a workspace member who can operate Mira (configure, receive escalations, reply as a human from the Tuturuuu chat mirror). People who only message Mira on a channel are not seats.
- Requires: an active workspace plan; the add-on attaches to it.
- Annual: ten months’ price, matching the existing catalog convention.
- BYOK: both add-ons accept the tenant’s own OpenAI, Anthropic or Google key. Replies on BYOK do not draw down the reply quota and carry the BYOK platform fee; channel count, triage volume and fair-use rate limits still apply. No seat discount, because infrastructure, support and channel onboarding costs remain.
Metering
Settled per turn by the tenant object and flushed tomira_usage_daily
through the work Queue.
Managed-key usage is also recorded in the existing AI credits ledger so one
source reports workspace AI spend.
Quotas, overage and throttling
- At 80 % of the pooled reply quota the workspace’s Mira managers are notified.
- At 100 %, the tenant’s choice applies: overage (default) at the
managed overage rate up to the tenant’s monthly spend cap, or
throttle (replies fall back to the
fastpreset, then to “a person will get back to you” with escalation). - The tenant’s daily spend cap and the durable stop fence apply regardless of plan headroom.
Entitlements
mira_tenants.plan_snapshot holds the add-on, seat count, quotas and period,
refreshed from the billing provider readback (never client checkout data).
The tenant object checks it before every turn:
Loss of the add-on (cancel, failed payment past grace) sets the tenant stop
fence; config and history are kept for 30 days for reactivation.
Cost of goods
Assumptions
A turn is one replied message. Input averages 3,000 tokens of which 2,000 are a cached stable prefix; output averages 150 tokens. Triage uses about 600 input and 20 output tokens on the cheap tier. Cloudflare operations per inbound message: one ingress request, three object requests, about ten SQLite row writes and one Queue message with three operations. Prompt-cache hits are assumed on 60 % of turns (low-traffic tenants miss the cache window), with cache writes at the provider’s write multiplier, and a 30 % token allowance for newer tokenizers. List prices per million tokens (input / cached input / output), checked 2026-11-21; re-verify before catalog approval, because providers change them (Gemini 3.8 Flash doubles on 2027-01-01):Per-unit cost
Per tenant per month (one seat)
Payment fees assume about 4 % plus $0.40 per charge. Support, Meta and Zalo
onboarding, and on-call are fixed costs outside COGS. Overage at $8 per 1,000
weighted replies is more than eight times the model cost of a weighted reply
on either preset, so overage never erodes margin.
Tuturuuu’s own Mira
The internal tenant at today’s volume and at ten times that volume is estimated in the Mira cloud channels cost model.Open decisions
- Price of personal-account mode for opted-in paying tenants, including the
per-account
SessionContainer(about $8 per account per month on thebasicclass); see personal opt-in. - Seat definition with the billing owners and the
packages/payment-corecatalog shape for a workspace add-on.