railyard/apps/rago/seeds/portfolio/scribase-portfolio.json
caelum0x 507837d774 fix(contract): publish the scribase.purchases.tracked_revenue meter (QY1.0 verify, Wave Q 5.2)
Dispatch 5.2 has QY1.0 add the Purchases meter to the consumer contract
before QU1.4 merges; it was not added, and QU1.4 shipped against its own
fixture. The Scribase seed gains the metric (sum of tracked_usd, one event
per organization and month, $0 mirror charge) and the contract its meter and
sample event, in the shape QU1.4 sends (transaction id
scribase:scribase.purchases.tracked_revenue:<org>_<YYYYMM>, tracked_usd and
billable_usd). consumers.test.ts 3/3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 14:18:33 +03:00

117 lines
3.6 KiB
JSON

{
"consumer": "scribase",
"description": "Scribase portfolio add-on and messaging meters (Wave P 5.3). Scribase's Dodo billing is the charge of record; this is a $0 usage mirror.",
"currency": "USD",
"billable_metrics": [
{
"name": "Scribase add-on slot active",
"code": "scribase.addon.slot_active",
"description": "One event per organization, slot and UTC day the slot was on.",
"aggregation_type": "count_agg",
"recurring": false
},
{
"name": "Scribase AI gateway tokens (BYOK)",
"code": "scribase.ai.tokens",
"description": "Tokens per call through the BYOK gateway; the customer's provider bills them.",
"aggregation_type": "sum_agg",
"recurring": false,
"field_name": "tokens"
},
{
"name": "Scribase analytics events",
"code": "scribase.analytics.events",
"description": "Events counted at the edge (stored or over the cap).",
"aggregation_type": "sum_agg",
"recurring": false,
"field_name": "events"
},
{
"name": "Scribase push notifications sent",
"code": "scribase.push.sent",
"description": "One event per push delivered to Expo.",
"aggregation_type": "count_agg",
"recurring": false
},
{
"name": "Scribase email sent",
"code": "scribase.email.sent",
"description": "One event per email accepted by the sender.",
"aggregation_type": "count_agg",
"recurring": false
},
{
"name": "Scribase Purchases tracked revenue",
"code": "scribase.purchases.tracked_revenue",
"description": "One event per organization and month: tracked_usd is the store revenue Purchases tracked, billable_usd the share Scribase bills (Wave Q 5.2, QU1.4).",
"aggregation_type": "sum_agg",
"recurring": false,
"field_name": "tracked_usd"
}
],
"plans": [
{
"name": "Scribase portfolio usage mirror",
"code": "scribase_portfolio_mirror",
"interval": "monthly",
"description": "Zero-priced mirror: records usage for reconciliation, never invoices.",
"amount_cents": 0,
"amount_currency": "USD",
"pay_in_advance": false,
"bill_charges_monthly": true,
"charges": [
{
"billable_metric_code": "scribase.addon.slot_active",
"charge_model": "standard",
"invoiceable": true,
"properties": {
"amount": "0.0"
}
},
{
"billable_metric_code": "scribase.ai.tokens",
"charge_model": "standard",
"invoiceable": true,
"properties": {
"amount": "0.0"
}
},
{
"billable_metric_code": "scribase.analytics.events",
"charge_model": "standard",
"invoiceable": true,
"properties": {
"amount": "0.0"
}
},
{
"billable_metric_code": "scribase.push.sent",
"charge_model": "standard",
"invoiceable": true,
"properties": {
"amount": "0.0"
}
},
{
"billable_metric_code": "scribase.email.sent",
"charge_model": "standard",
"invoiceable": true,
"properties": {
"amount": "0.0"
}
},
{
"billable_metric_code": "scribase.purchases.tracked_revenue",
"charge_model": "standard",
"invoiceable": true,
"properties": {
"amount": "0.0"
}
}
]
}
],
"transaction_id": "<product>:<meter>:<source id> (a repeated transaction_id is a no-op)",
"external_customer_id": "the product's own organization id"
}