This guide covers the company-side accounting surface: invoicing,
purchase-order billing, reports, trends, and CSV export. Everything here
runs in the admin console at /admin.
Audience: operations and accounting staff. For pricing and customer setup see
USER-MANAGEMENT.md; for the end-user view seeCUSTOMER-PORTAL.md.
Open http://<host>:<port>/admin and sign in.
The development credentials are demo /
$$$Adm1n### (override with DEMO_ADMIN_USER /
DEMO_ADMIN_PASSWORD; the primary account is
ADMIN_USER / ADMIN_KEY).
Before invoicing, each customer needs a billing type and an email — set on the Customers tab:
Customers can also carry a prepaid balance (funded from the customer portal). When an invoice is issued and the balance fully covers the billable amount, the balance is drawn down and the invoice goes straight to paid. Partial coverage is left untouched — there are no partial payments.
On the Invoices tab, pick a period (month), optionally narrow to one customer, optionally set a PO number, and click Generate.
Generation rules:
INV-<period>-<sequence>,
e.g. INV-2026-07-0002.Each row shows status, billing type, totals, and due amount:
Filter the table by customer, period, or status with the filter bar.
The Reports tab answers “who owes what, and how is usage trending?”
billing-report.csv with the active filters, ready for the
accounting package.The same data is available as JSON/CSV from the API:
GET /admin/api/reports/billing?from=…&to=…&customerId=…&billingType=…&format=csv
and GET /admin/api/reports/usage-trend?bucket=day|week.
The System tab shows integration health (Zapier app directory, version, triggers, creates) and the current period at a glance: calls, billable amount, open invoice count, and open amount.
A daily job (src/jobs/report-usage.ts, scheduled
separately) reports the billable delta of every Stripe-billed customer
to Stripe Billing meter events. It is idempotent: a ledger records the
cumulative reported cents per customer per period, and only the delta
since the last successful run is sent. PO customers are excluded by
having no stripeCustomerId.
Environment (.env at the project root):
STRIPE_SECRET_KEY=sk_live_or_test_...
ZAPPIER_DB=/absolute/path/to/zappier.db # optional
zappier.db by default): invoices,
invoice_lines, billing_ledger,
customers.