Billing & Allocations Workflow
Turn utility bills into subscriber statements and invoices — with an audit trail
Turn utility bills into subscriber statements and invoices — with an audit trail.
Community solar operators spend 1-3 days every month on manual billing. Gridline runs the entire cycle in 10-30 minutes: extract credits from PDFs, compute allocations, generate statements, create invoices, deliver to subscribers — with a complete audit trail.
Inputs
What you provide to start a billing run:
- Utility bill PDFs — One per subscriber per billing period (formats vary by utility)
- Subscriber records — Names, emails, utility accounts, allocation percentages
- Rate schedules — Credit rates and fee structures (per-kWh, monthly, tiered)
- Allocation rules — How credits split between project owner and subscriber
- Statement templates — Branded PDF templates with your logo and formatting
- Delivery preferences — Email settings, portal access rules
All inputs are versioned. Re-run any billing cycle with the exact inputs used at that time.
Controls
The guardrails that ensure accuracy and prevent errors:
Confidence threshold
Extracted bill data below 85% confidence triggers human review. You validate the uncertain numbers before the run continues.
Allocation invariant
Total credits allocated across all subscribers must equal total credits extracted from utility bills. If the math doesn’t close, the run halts.
Duplicate detection
Gridline flags if you try to run billing for the same subscriber + billing period twice. Prevents accidental double-billing.
Re-run semantics
Re-running billing for a subscriber archives the old run (preserving the audit trail) and creates a new run with updated inputs or templates. Old invoices are voided, new ones generated.
These controls are enforced at runtime. You can’t bypass them.
Pipeline
The eight-step pipeline that runs for each subscriber:
1. Ingest
Upload utility bill PDFs. Files are stored immutably in object storage. Metadata (subscriber ID, billing period) is captured.
bill.pdf stored → linked to subscriber record
2. Parse
Extract credits, usage data, billing period, and account identifiers from PDF. LLM-based extraction with structured output validation.
bill.pdf → parsed_data.json (includes confidence scores)
3. Review (conditional)
If any extracted field has confidence < 85%, run pauses. You review the flagged fields, confirm or correct, then continue.
Low-confidence fields flagged → human validates → run continues
4. Allocate
Apply allocation rules and rate schedules. Compute project owner share vs subscriber share. Handle edge cases (proration, tiered rates, monthly fees).
parsed_data.json + allocation rules → allocations.json
5. Generate statement
Populate PDF template with subscriber credits, charges, net amount, billing period. Output is a branded statement ready for delivery.
allocations.json + template → statement.pdf
6. Create invoice
Sync to PayPal (or configured payment processor). Create invoice with correct line items, amounts, and payment link.
allocations.json → PayPal invoice created → invoice_id + payment link
7. Deliver
Email statement PDF to subscriber with secure portal link (time-limited token, 30-day expiry). Portal shows statement + payment button.
statement.pdf + invoice link → email sent → portal link generated
8. Reconcile
Log delivery confirmation, invoice ID, portal token. Update subscriber ledger with new balance. Mark run as complete.
Run status: complete → subscriber ledger updated → audit log written
Artifacts
Every billing run produces 7-12 auditable outputs:
Core artifacts (always generated):
bill.pdf— Original utility billparsed_data.json— Extracted credits, usage, dates + confidence scoresallocations.json— Computed shares (project owner vs subscriber)statement.pdf— Branded subscriber statementinvoice_id— PayPal invoice ID + payment linkemail_event— Delivery confirmation (timestamp, recipient, status)audit_log— Complete run history with timestamps for each step
Optional artifacts (depending on configuration):
review_log— If human review triggered, records what was flagged and changedrerun_diff— If re-running, shows what changed from previous runledger_entry— Subscriber balance updateportal_token— Time-limited secure link for online viewingvoid_invoice_id— If re-running, old invoice voided
All artifacts are stored immutably. You can retrieve them months later to see exactly what happened in any billing run.
Demo
Want to see it run? Try the interactive demo with sample data.
The demo includes:
- Pre-loaded subscribers with realistic utility accounts
- Sample utility bill PDFs from different utilities
- Full pipeline execution (all 8 steps)
- Real PDF statements generated
- Mock invoice creation (sandbox mode, no real charges)
Or request a walkthrough where I’ll run a live billing cycle with your questions answered in real time.
What’s different from manual billing
Before Gridline:
- 1-3 days every month per project
- Copy-paste from PDFs into spreadsheets
- Manual invoice creation, one by one
- Mistakes caught after invoices sent
- No audit trail, hard to trace errors
- No vacation during billing week
With Gridline:
- 10-30 minutes per project (demo shows mechanical system capability)
- Credits extracted automatically with confidence scores
- Statements and invoices generated together
- Review flagged items before anything sends
- Complete audit trail for every run
- Re-run any billing cycle with one click
Roadmap additions
Planned enhancements to the billing workflow:
Payment reconciliation — Match incoming payments to invoices, flag discrepancies, auto-update ledgers
Collections automation — Escalation rules for overdue invoices, automated reminders, payment plan tracking
Multi-project consolidation — Single statement for subscribers across multiple projects
Custom statement templates — Visual template editor for non-technical users
Batch processing — Run billing for all subscribers in a project with one click
ERP sync — Push ledger entries to QuickBooks, Xero, NetSuite
Billing is running in production. These additions are coming based on operator feedback.