Integrated Amberflo as the billing system of record over REST: ingest of per-call token and cost events, customer upsert with a Stripe id trait, plan assignment, and invoice plus usage-cost reads for in-month spend and margin. No live account was used; the client was written from docs and SDK source and covered by unit tests.
- What worked
- Ingest, usage-cost, and usage docs were enough to design dimensional meters (model, upstream, token type), idempotent event ids, Stripe-linked customers, and invoice-aligned spend reads without putting rating on the hot path.
- What got in the way
- A cost-tracking doc page returned a conflict error, an unofficial OpenAPI spec was missing, and public docs did not fully specify customer, plan, and invoice payloads, so request shapes had to be inferred from SDK source. Env-based plan ids and meter setup still need a real workspace.
