Billing Service — Service Readiness
Status: populated Owner: Platform Engineering + SRE Last updated: 2026-04-18
Service is production-ready only when EVERY box below is checked.
Docs
- All 17 service docs complete (no stubs remain).
- Pricing rule catalogue reviewed by Finance.
- Operator cost catalogue reviewed by Finance.
Code + Tests
- ESLint: domain import-restriction rule passes.
- TypeScript strict, zero errors.
- Unit coverage: aggregates ≥ 95%, VOs 100%, domain services ≥ 90%.
- Financial correctness property tests pass (margin formula, invoice subtotal reconciliation).
- Integration tests pass: tenant-isolation, ingest-happy-path, ingest-idempotency, pricing-cache, invoice-generation, invoice-void, pricing-version.
- Contract tests green: schema registry conformance for
billing.message.charged.v1(consumed) andbilling.invoice.generated.v1(produced). - Load test: 10,000 events/sec sustained ingestion; consumer lag stable < 5000.
Finance / Business
- Pricing rules for all active (accountTier × operatorId × direction) combinations loaded and verified.
- Operator costs for all active operators loaded and verified.
- Finance team has reviewed and approved initial pricing configuration.
- Invoice PDF template reviewed and approved.
- Partial-first-month invoicing approach acknowledged by Finance.
Security
-
security-revieweragent run, zero critical/high. - Tenant isolation integration test passes.
- RLS policies active on all
billing.*tables. - Invoice void restricted to
platform.financerole — verified in staging. - S3 bucket SSE-KMS enabled; bucket policy allows only billing-service IAM role.
Observability
-
/metrics,/health/live,/health/readyendpoints up. - All billing metric families visible in Grafana.
- All 7 alerts configured with runbooks linked.
- NATS consumer lag dashboard visible.
Infra / Rollout
- Helm chart + Terraform module committed.
- CronJob for invoice generation deployed and tested in staging (manual trigger).
- S3 bucket and lifecycle policy provisioned.
- NATS stream and durable consumer configured.
- Vault policy grants confirmed.
- Canary deploy completed in staging.
Sign-off
- Tech lead ✅
- SRE ✅
- Security ✅
- Finance ✅
- Product ✅