Verae Time × Zapier

Invoices, PO billing, reports

site/packages/zappier/docs/ACCOUNTING.md

Invoices, PO billing, reports

Company Accounting Walkthrough

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 see CUSTOMER-PORTAL.md.


1. Sign in

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).

Admin login

2. Billing identity per customer

Before invoicing, each customer needs a billing type and an email — set on the Customers tab:

Customers with billing types

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.


3. Generate invoices

On the Invoices tab, pick a period (month), optionally narrow to one customer, optionally set a PO number, and click Generate.

Invoices tab

Generation rules:

4. Issue, view, collect

Each row shows status, billing type, totals, and due amount:

Print-ready invoice

Filter the table by customer, period, or status with the filter bar.


The Reports tab answers “who owes what, and how is usage trending?”

Reports tab

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.


6. System snapshot

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.

System tab

7. Automated Stripe reporting

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

Data notes