Platform Billing
Internal docs for FIXX platform billing: SaaS invoices from FlowPOS (operator) to tenant businesses.
PWA (platform admin): Platform Billing → Accounts, Plans, Leads (/platform-billing/leads), Collection Jobs (/platform-billing/jobs), and Businesses (/platform-billing/businesses). Access is limited to FIXX super and owner — see Access Control. The businesses screen is a staff directory of every tenant (sort, billing filter, creating client, last app open). Behavior, query parameters, and the Firebase backfill are in Business Directory.
Guides
| Guide | What it covers |
|---|---|
| Access Control | Who can see the menu and call admin APIs (FIXX super/owner vs tenant) |
| Business Directory | GET /platform-billing/businesses, creating-client stamp, last app open, backfill |
| Lead Module | Landing-page capture, Chatwoot refs, and the FIXX operator inbox (GET /platform-billing/leads) |
| Platform leads troubleshooting | Missing Chatwoot tickets, 403 inbox, empty search, deep-link gaps |
| Collection Loop | Daily BullMQ job (close → factura → notices), timing, branch fees, ops checklist |
| Testing and Iteration | Local and staging: projection dry-run, unit tests, manual close, SQL wipe to re-run the same period |
| Account Status and Churn | Cancelled / suspended / past due, branch deactivation, projection “no charges” as a review signal |
| Legacy Sales Totals | Variable-on-sales base: ingest POST, Jobs table GET, related tables, close gate, curl examples |
| Legacy RPA-ERP migration | Operator CLI: provision → legacy-meta → history → verify → rates → sales-totals; targeting local/staging/prod via DATABASE_URL |
Specs
- Architecture:
specs/045-platform-billing-architecture/ - Collection loop:
specs/047-platform-billing-collection-loop/