Walt

Billing Pipeline — Stripe → Queue → ClickHouse

Meter events → queue → holon worker → Stripe + ClickHouse + tax.

Billing Pipeline — Stripe → Queue → ClickHouse (v2026-08-02T101544Z-ab2bbdebf5) 2026-08-01 | Meter events → queue → holon worker → Stripe + ClickHouse + tax. 1 - Billing API Requests Client POST /api/billing/accounts GET /api/billing/accounts/{account_id} POST /api/billing/invoices GET /api/billing/invoices/{invoice_id} billing_router.py create_account() get_account() create_invoice() get_invoice() account details 2 - Billing Queue billing_queue.py enqueue() execute() BillingQueueEntry operation_id op_name params operation deta… 3 - Billing Processing billing_service.py create_account() get_account() create_invoice() finalize_invoice() mark_paid() Stripe stripe_charge_id ClickHouse holons table account data invoice data 1. Client sends request to billing A… 2. billing_router.py processes the r… 3. billing_queue.py enqueues the ope… 4. billing_service.py executes the o… 5. Stripe and ClickHouse are updated… Create Account Request {"name": "Company Inc", "email": "contact@company.com", "tier": "standard", "state": "CA"} Queue Depth Event {"max_concurrent": 3, "in_flight": 1, "available": 2, "queued": 5, "ts": 1672531200} The billing API is deprecated and should use MCP tools instead. Legend actor = initiates work · process = code path · store = state on disk · bus = durable queue · dashed = separate process cyan = request flow · pink = state read/write · dashed green = pull / return path · red = refusal

Provenance

This drawing is generated, not drawn. It is rebuilt from the source files below, so when they change the picture changes — a diagram here cannot quietly describe a system that no longer works this way.

Owner
Walt
Slug
billing-pipeline
Rendered
2026-08-02T101544Z
From commit
ab2bbdebf5
Watches
9 paths
  • daemon/src/billing_router.py
  • daemon/src/billing_router_bus.py
  • daemon/src/billing_router_with_grant.py
  • daemon/src/billing_queue.py
  • daemon/src/billing_queue_router.py
  • daemon/src/billing_service.py
  • daemon/src/billing_holon_worker.py
  • daemon/src/billing_tax.py
  • daemon/src/clickhouse_billing.py