haqlLabs

haql-revenue · Purchaser statement audit

The purchaser's statement is the invoice. haql-revenue checks the arithmetic behind it.

An independent operator never sees the purchaser's metering, pricing or fee logic — only the monthly statement that stands in for an invoice. Every lease is off by a little: a missed run, a stale price, a fee that is not in the contract, a line paid twice. Individually they look like rounding. Across hundreds of wells and several purchasers, they are the revenue you did not book. haql-revenue reconciles production against every statement and ranks each exception by dollar impact, with the evidence attached.

Run it yourself: a local CLI and a local review UI, request a private build — Python 3.8+, no third-party packages. No data leaves the machine, no license server call.

Read the public guide: what it does, what it checks and what it does not do →

one command, one month
# reconcile every purchaser statement against production
haql-revenue reconcile --data-dir ./2026-06 \
  --out work/recon.json --report-dir work/reports

# result (bundled synthetic demo)
leases=3 statements=14 findings=10
  high=3 medium=4 low=3
  reviewed $2,208,965.00
  potential leakage $61,987.50 (2.81%)
    MISSING_STATEMENT      -$28,600.00
    PRICE_VARIANCE         -$12,500.00
    VOLUME_VARIANCE        -$10,800.00
    DUPLICATE_LINE          -$3,565.00
  evidence packet → report.html / report.csv

Figures above come from the bundled synthetic demo — illustrative, not customer results.

What it is

Your records and their statements in. A dollar-ranked exception list out.

No portal, no upload, no statement re-keying into a spreadsheet. The reconciliation runs on the CSVs you already export, in the same order every time, and the output is an evidence packet a controller can review.

Goes in

A lease master (with the purchaser's spellings as aliases), production by lease / product / month, the purchaser statements, and optionally run tickets and contracts. Purchaser lease names are matched through aliases and normalisation rather than guessed, so an unmapped name is reported instead of silently dropped.

Comes out

A reconciliation (JSON, text, CSV and a self-contained HTML report) with every finding carrying a severity, a confidence, a dollar impact and an evidence trail — statement ID, source filename, line number — plus a summary of dollars reviewed and leakage rate.

Why you need it

The differences that matter are too small to notice one at a time.

A revenue accountant does not have time to re-derive every lease from every purchaser every month. So the check becomes a spot check, and the spot check never reaches the lease that is quietly short.

Production with no statement

Volumes are booked in production but no statement line arrives for that lease and month. Nothing is paid, and nothing flags it (MISSING_STATEMENT).

Price below the contract

The statement applies a price that does not match the fixed price in the contract — a stale deck or a keying error, repeated every month it goes uncaught (PRICE_VARIANCE).

Volume short of the run

The paid volume is below what was produced and ticketed, beyond any reasonable tolerance (VOLUME_VARIANCE, RUN_TICKET_VARIANCE).

Fees the contract never allowed

Deductions exceed the allowed rate per unit, or a line is paid twice, or the net value simply does not equal volume × price − deductions (UNSCHEDULED_DEDUCTION, DUPLICATE_LINE, VALUE_MISMATCH).

Without haql-revenue

One purchaser is spot-checked, the rest are paid as received. Differences under a thousand dollars per lease are invisible against a month's gross, so they are never chased.

The statement is accepted because checking it is not affordable.

With haql-revenue

Every lease, product and month is reconciled, and the exceptions are ordered by dollars so the review starts where the money is. Each one arrives with the statement line and source file behind it.

The findings become a query list for the purchaser, not a guess.

What it actually catches

Thirteen checks across volumes, prices, deductions and value.

The full check list
  • Missing statement — production exists, no statement line (MISSING_STATEMENT)
  • Statement without production — a paid line with no production record behind it (MISSING_PRODUCTION)
  • Volume variance — statement volume differs from produced volume beyond tolerance (VOLUME_VARIANCE)
  • Zero volume — production is reported and the statement pays zero (ZERO_VOLUME)
  • Price variance — statement price differs from the fixed contract price (PRICE_VARIANCE)
  • Unscheduled deduction — deductions exceed the allowed contract rate (UNSCHEDULED_DEDUCTION)
  • Value mismatch — net value does not equal volume × price − deductions (VALUE_MISMATCH)
  • Duplicate line — identical statement lines for one lease, product and month (DUPLICATE_LINE)
  • Negative volume — a reversal or adjustment with no explanation on the line (NEGATIVE_VOLUME)
  • Unmapped lease — a purchaser's lease name with no alias in the master (UNMAPPED_LEASE)
  • Unit mismatch — units that cannot be converted (UNIT_MISMATCH)
  • Missing run ticket — tickets exist for the lease elsewhere but not this month (MISSING_RUN_TICKET, reported as a control gap at $0)
  • Run-ticket variance — ticket volume disagrees with production (RUN_TICKET_VARIANCE)

Severity follows the dollar impact: high at $10,000 or more, medium at $1,000, low below that. Every threshold is configurable, and findings are advisory — a question with evidence, not a legal demand.

Tolerances are explicit and adjustable: volume is the greater of 100 units or 0.5% of produced volume, price 1% of contract price, deductions $0.01 per unit. bbl ↔ gal and mcf ↔ mmbtu conversions are supported.

Scope

What it does not do yet.

Worth stating plainly, because a reconciliation tool that overstates its coverage is worse than none.

CSV only

No PDF or scanned statement extraction yet. The CSVs have to come from your own export or the purchaser's data file.

Fixed-price contracts

Index-based formulas (WTI + differential, gas basis) are not applied in this version.

One purchaser per lease-month

Multiple purchasers on one lease are aggregated, and price and deduction checks are skipped for that key with a warning. Per-purchaser allocation is next.

No plant or severance logic

No gas-plant / NGL settlement, prior-period accruals, recoupment, severance tax or net revenue interest.

No integrations

No ERP, accounting or SCADA connector. Files in, files out.

Single-user local UI

The bundled review UI is a local pilot surface with an access code, not a hosted multi-tenant application.

Pricing

Priced against one month of unbooked revenue.

On the bundled synthetic case the tool surfaces $235,295.00 of findings against $6,697,250.00 of statement value — 3.5%. Real numbers depend on your purchasers, but a single missed statement or a price deck that never rolled is worth more than a year of the license.

Sample check

Free

One month of production and statements, on the house. No key, no card. You get the full exception list and evidence packet back.

Send a month of statements

Team

$349/month

Annual commitment, up to 10 users, unlimited leases and purchasers. Evaluation use needs no key.

On-premise

$1,750/month

Annual, per site, unlimited users on that site. Runs air-gapped on your own infrastructure.

Evaluation: 30 days, no license key needed. Licensed builds verify a signed ed25519 token offline — company, tier, seats, expiry and machine binding — with no activation server.

Next

Send one month of statements and see what comes back.

Email the production export and the purchaser statements — anonymised if you prefer — and get the full exception list at no cost.

kunleaz100@gmail.com