carlos / platform Public

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; neutral billable / renewal_failing facts (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 the charge.succeeded/captured/refunded webhook 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 revenue and carlos 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).

Commits 45
Discussions 1 1 open
Tasks 10/10 done

Activity