telco

Reconcile invoice dispatch

Find missing, extra or conflicting transport receipts for every original and final invoice sealed in a month.

On this page

Billing operations compares two independent records before closing a month. billd supplies the invoices and their recorded dispatch proofs. The delivery provider supplies its actual handoffs for that invoice population. A dispatch date records sending. Subscriber receipt is a separate fact. Itemisation and retention

Try the comparison

Download the billing snapshot and sender extract into a private directory. Run:

telco dispatch review snapshot.json sender.json > review.json

The example matches two invoices. The final invoice was sealed on 30 November and sent on 1 December. One credit note is counted separately. Replace one sender row’s bill UUID with another UUID and rerun. The row count stays at two. The report identifies the missing handoff and the extra document.

Capture the billing population

Use the dedicated operator connection to billd. Use HTTPS outside loopback. With an operator bearer in TELCO_TOKEN, a local capture looks like this:

umask 077
curl --fail --silent --show-error -H "Authorization: Bearer $TELCO_TOKEN" \
  -D snapshot.headers -o snapshot.json \
  'http://127.0.0.1:9402/invoice-dispatches?seal_month=2026-11'

Select a month that has ended on billd’s business clock. The snapshot includes all invoices and final bills sealed that month, including zero amounts and originals later credited. It reports the excluded credit-note count. Agree separate coverage for those notes with the delivery owner. Above 10,000 eligible documents the endpoint refuses the entire month. The export covers the entire installation. Use it only for an estate the reviewer is authorized to see. Billing API schema

The server assigns an estate UUID when it initializes the database. Restores preserve that identity. Agree it with the supplier when commissioning the integration. A matching UUID identifies the scope, while authenticated acquisition establishes the source. Keep the quoted SHA-256 ETag from the capture alongside the original bytes. The report’s snapshot_sha256 should match the unquoted ETag.

Collect the sender evidence

Ask the delivery owner to export all handoffs for that seal month through its stated cutoff, including later sends. The sender’s file names its format, estate, seal month, extraction date and rows. Each row carries the invoice UUID and an outcome:

OutcomeFields beyond bill UUID and outcome
sentdispatched_on and the original opaque reference also supplied to billd
pending or failedNone

Use ISO dates (YYYY-MM-DD) and copy each reference exactly, including case. References must contain 1–256 UTF-8 bytes, include a non-whitespace character and contain no control characters. The sender supplies one outcome per invoice and keeps failed or unresolved handoffs visible. Generating this file from billd would reproduce billing’s own omissions. Each input is a JSON file of at most 16 MiB with at most 10,000 invoice or sender rows. Keep addresses and recipient details at the delivery provider.

Resolve the result

ResultAction
Exit 0 · matchedAll eligible invoices have one matching successful handoff. Record the reviewer, date, scope, excluded kinds and both SHA-256 fingerprints.
Exit 1 · gaps or emptyReview the issue codes and their owner. Billing investigates a missing proof. The sender investigates missing, extra, duplicate, failed or pending rows. Both owners reconcile conflicting dates or references. Confirm an empty population separately.
Exit 2 · invalid inputCheck the indicated file, scope and limits, then obtain a fresh export. Discard the failed run’s output.

A legitimate correction uses the owner’s normal evidence procedure. Refresh both inputs and retain a new decision when evidence changes. The offline review reads files only. It emits invoice identifiers for exceptions and keeps the supplier references out of the report.

Download Markdown