billing-dash-1-data
Billing dashboard Plan 1, the money record (spec docs/superpowers/specs/2026-11-09-billing-dashboard-design.md §3, §4.2-§4.4, §4.7; plan docs/superpowers/plans/2026-11-09-billing-dashboard-1-data.md). Branched off design-billing-dashboard (spec + all three plans).
What it adds, on a console with billing on:
- Each subscription's yearly amount after discounts, before tax (
billing_accounts.annual_amount, -1 unknown), and per-account fresh-read time; neutralbillable/renewal_failingfacts (no Stripe status words in the console). billing_payments: one row per Stripe balance movement (charge, refund debit, failed-refund reversal, failed delayed payment, fee incl. FX fee), matched to accounts, tax-exclusive in every direction. Fed by thecharge.succeeded/captured/refundedwebhook and an hourly reconcile with a cursor that never passes an unrecorded movement; first run backfills from 2010.- Daily ECB euro rates (
internal/fxrate), paying/groups/ARR, one money gate (moneyReady) every figure passes, and frozen daily ARR + per-account snapshots (history starts at the first pass). carlos billing revenueandcarlos billing payments [-month] [-kind], copy approved by Paul (reviews il22ckkydvo2n7onrbwviz3sfq, udf3zvfpk3xj3tlmj43qusluku).
Review: every task had an Astra review (all clean after fix rounds); whole-branch final review by Astra and Fable, one fix wave, Astra re-review clean. Root-read census (#280) READY in three rounds (last on b9854399). go build ./... clean; make test found one branch failure (closedDoors list), fixed in 47bcc075.
Before the first roll that carries this: add Balance, Charges and Refunds read to the dev and flagship restricted keys, and charge.succeeded / charge.captured / charge.refunded to both webhook endpoints. Without them the money pass fails its job and nothing else changes.
Follow-ups (not blocking): BDC-36 says "settled in euros" (CLI prints the settlement currency); BDC-20 says "a paying account" but also fires for trials; RematchPayments rescans unmatched rows hourly; disputes (adjustments) are not recorded (spec non-goal).
Discussions 1 open
Tasks 10/10 done
Activity
- paul@keymail.dev pushed 22a58d05e cli: golden corpus records the billing usage with revenue and payments
- paul@keymail.dev pushed d55bd6359 merge: origin/main into billing-dash-1-data
- claude agent, operated by paul@keymail.dev opened Billing dashboard 1: controller rulings
- paul@keymail.dev pushed dc971840c console: count the billing revenue and payments closed doors
- paul@keymail.dev pushed 47bcc0756 console: name the billing revenue and payments doors as closed
- paul@keymail.dev pushed b9854399b console: the claim probe reads the payments door's new object
- paul@keymail.dev pushed c5bb37bf2 census: re-pin the root envelope for the final billing_cli.go fixes
- paul@keymail.dev pushed 5c424e54b cli: print the euro zero, not "()", when ARR has no amounts
- paul@keymail.dev pushed 782b196b6 console: gate the payments door on the payment record and say test mode
- paul@keymail.dev pushed b5486cbd5 console: completeness covers every live subscription, in one place
- paul@keymail.dev pushed bc0e9d184 billing: record a failed bank debit as a payment failure, not a refund
- paul@keymail.dev pushed 22095d947 console: backfill payments from a fixed 2010 floor, not account creation
- paul@keymail.dev pushed 8fa2d1363 console: rematch keeps a subscription learned for an unmatched row
- paul@keymail.dev pushed 294a1ea20 billingstripe: keep the decode reason when a listed object is refused
- paul@keymail.dev pushed 2983992f5 billingstripe: an amount is known only for prices that recur yearly
- paul@keymail.dev pushed 43d96d4b2 billing: fee rows carry their currency, amount and reason
- paul@keymail.dev pushed 6ebfb6eec billingstripe: record stripe_fx_fee movements as fees
- paul@keymail.dev pushed e58becd22 cli: label converted ARR and MRR as estimates (BDC-6, BDC-35)
- paul@keymail.dev pushed 90dc56bbf cli: zero-decimal amounts, rate clause on MRR, move the BDC-37 note
- paul@keymail.dev pushed 9d5422273 docs: census review brief for billing dashboard 1
- paul@keymail.dev pushed 4981b99f7 census: billing dashboard 1 record-write re-pin and root overlay
- paul@keymail.dev pushed cbc843b68 cli: carlos billing revenue and payments
- paul@keymail.dev pushed 680ae2e8c console: snapshot rows follow live; unknown amounts include cancelling
- paul@keymail.dev pushed 65a589c92 console: paying accounts, groups, ARR and its daily snapshot
- paul@keymail.dev pushed 588dab2b5 billing: neutral billable and renewal-failing subscription facts
- paul@keymail.dev pushed bd66229d6 console: refuse a euro conversion that is not a finite int64
- paul@keymail.dev pushed f594ad381 fxrate: daily ECB reference rates for the billing figures
- paul@keymail.dev pushed 9da773773 console: hold the payment cursor on a movement its charge read lacks
- paul@keymail.dev pushed 87e3a0365 console: reconcile payments hourly, from the webhook too
- paul@keymail.dev pushed 973872bb0 console: domain refunds take their charge's tax share