Phase 4 part 1: the full Stripe sync, and margins per product

Customers, invoices with all their lines (both of Stripe's line shapes),
credit notes, refunds (with their customer) and products: a backfill,
then the Events API every hour, and a new backfill when events have
expired. Metrics page with sync status. Gross margin per product: a
default (60%) and overrides, with names from Stripe's products or the
invoice lines. Schemas 18 and 19.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 09:24:32 -07:00
co-authored by Claude Opus 5.5
parent 07c4491f48
commit 2c242d8c94
15 changed files with 1167 additions and 6 deletions
+1
View File
@@ -161,6 +161,7 @@ func run(log *slog.Logger) error {
go srv.RunOutreach(ctx)
go srv.RunTracking(ctx)
go srv.RunSEO(ctx)
go srv.RunMetrics(ctx)
// A sync falls due, and a claim times out, without anything being
// written: refresh the state file each minute.
go func() {