FBR Digital Invoicing Integration
Real-time statutory e-invoicing between a business billing system and Pakistan's Federal Board of Revenue.
Client Challenge
The client was required to submit every sales invoice to the FBR digital invoicing service in real time. Their existing billing system had no integration path, and the compliance team was manually re-entering invoices into a government portal — slow, error-prone, and impossible to reconcile at month end.
The submission API also failed unpredictably: intermittent timeouts, occasional schema rejections, and no reliable way to tell whether a timed-out invoice had actually been recorded. Duplicate submissions were a real compliance risk.
Timeline
- W1–2Discovery, API analysis, field mapping
- W3–5Validation engine & submission service
- W6–7Retry queue, reconciliation, audit log
- W8UAT, parallel run, production cutover
Our Solution
- A validation layer that checks every invoice against the FBR schema and business rules before submission, so rejections are caught locally.
- An asynchronous submission service backed by a durable queue, with exponential backoff and a bounded retry policy.
- Idempotency keys per invoice so a retried submission can never create a duplicate filing.
- A reconciliation job that queries submission status for anything left in an uncertain state.
- An operations dashboard showing submitted, pending, failed and reconciled invoices with full request/response history.
Architecture
Billing system adapter
Captures invoice events via API or database change feed
Validation & mapping service
Schema checks, tax-rule validation, payload construction
Queue + submission workers
Idempotent, retried, rate-limited FBR API calls
Audit store & reconciliation
Immutable attempt log, status sweeps, ops dashboard
Technologies
Results
Manual re-entry eliminated
Invoices are submitted automatically at the point of issue; the compliance team reviews exceptions instead of typing every record.
No duplicate filings
Idempotent submission and reconciliation removed the duplicate-filing risk that manual retries created.
Audit-ready by default
Every attempt, response and status change is recorded, so month-end reconciliation is a query rather than an investigation.