Saturday, 21 November 2026 Press Releases Newsletter RSS
Breaking
WhatsApp Business Account Hacked in Pakistan: Full Recovery Guide Special Technology Zones Authority (STZA) & IT Park Expansion in Pakistan: Islamabad, Karachi, and Lahore Ground Report Pakistan Software Export Board & Industry Consortium Launch 'TechBridge Pakistan 2026' to Connect 500 Startups With Global Markets Global Tech Safety Summit 2026: International Standards for Frontier AI and Data Security Announced WhatsApp Business Account Hacked in Pakistan: Full Recovery Guide Special Technology Zones Authority (STZA) & IT Park Expansion in Pakistan: Islamabad, Karachi, and Lahore Ground Report Pakistan Software Export Board & Industry Consortium Launch 'TechBridge Pakistan 2026' to Connect 500 Startups With Global Markets Global Tech Safety Summit 2026: International Standards for Frontier AI and Data Security Announced
WritePures

Your internet will fail. FBR's service will be unavailable at some point. Both will happen while a customer is waiting.

How your system behaves in that moment is the difference between a minor delay and a shop that cannot trade.

The three possible designs

Block the sale. No identifier, no invoice. Strictly compliant, and commercially unacceptable — you have stopped trading because of a network problem.

Complete the sale and queue the invoice. Serve the customer, transmit when the connection returns. Keeps the business running and requires care to stay correct.

Fall back to manual. Record on the portal afterwards. Fine at low volume, impossible at a busy counter.

Most working implementations use the second with the third as a long-outage backstop.

Confirm with FBR what fallback is acceptable, and get it in writing before you need it. Designing a queue that FBR considers non-compliant is an expensive way to find out.

Building the queue properly

If you queue, four things have to be right.

Durable storage. The queue survives a power cut and a restart. An in-memory list is not a queue.

Idempotency. Each invoice carries your own unique reference, and retrying one already accepted does not create a second record. This is the one that produces the worst mess when it is missing, because duplicate reported sales are harder to unwind than missing ones.

Ordering and sequence. Your invoice numbering stays unbroken. Gaps invite questions.

Visibility. Someone can see how many invoices are waiting and how old the oldest is. A queue nobody watches silently becomes a reconciliation problem weeks later.

Pseudocode for the transmit worker:

for each queued invoice, oldest first:
    if already_acknowledged(invoice.local_reference):
        mark_sent(invoice); continue

    response = transmit(invoice)

    if response.accepted:
        store_identifier(invoice, response.invoice_number)
        mark_sent(invoice)
    else if response.is_validation_error:
        flag_for_human(invoice, response.reason)   # never retry blindly
    else:
        leave_queued(invoice)                      # transport problem, retry later

Note the middle branch. A validation error will fail identically forever — retrying it in a loop achieves nothing except filling your logs and hiding real problems.

Reconciliation

Whatever the design, check daily that every invoice issued has an identifier:

-- invoices from yesterday with no FBR identifier
SELECT invoice_number, issued_at, total
FROM invoices
WHERE issued_at >= CURRENT_DATE - 1
  AND fbr_identifier IS NULL
ORDER BY issued_at;

Run it every morning. An empty result is the only acceptable answer, and the day it is not empty you want to know on day one rather than at month end.

What staff need

A written card at the counter, not a policy document:

  • What the screen shows when transmission fails.
  • Whether to complete the sale, and exactly how.
  • What to tell the customer.
  • Who to notify, and after how long.
  • What happens to the invoice afterwards.

Write it before go-live. Nobody composes clear instructions with a queue forming.