FBR Digital Invoicing & Product Authentication by Zain IrfanFBR Digital Invoicing & Product Authentication by Zain Irfan

FBR Digital Invoicing & Product Authentication

Portfolio project
Zain Irfan
FBR Digital Invoicing & Product Authentication | Zain Irfan
Web App · Laravel · FBR API

FBR Digital Invoicing & Product Authentication

A Laravel app that submits a manufacturer's sales invoices to Pakistan's FBR digital invoicing system — calculating sales tax, tracking each invoice's FBR status and retrying failures — and lets buyers verify products with a unique PIN.
Laravel
FBR Digital Invoicing API
REST API
Sales Tax
CSV Import
FBR
Digital invoicing
Invoices submitted in FBR's format with the response stored on each invoice.
Retry
Failure handling
Rejected invoices show FBR's error and can be fixed and resubmitted.
PIN
Product verification
Buyers check a product number and PIN to confirm it is genuine.

The challenge

Pakistan's Federal Board of Revenue requires registered businesses to report sales invoices electronically through its digital invoicing system. The client was preparing invoices manually and needed every sale reported to FBR in the right format — seller NTN/STRN, HS codes, sales tax and totals — and to know immediately which invoices FBR had accepted and which had been rejected.
The same client also had a counterfeit problem: buyers needed a simple way to confirm that a product was genuine.

What I built

I built a Laravel admin where staff record sales invoices line by line; the app calculates the value before tax, 18% sales tax and the inclusive total for each item and for the invoice. With one click an invoice is formatted to FBR's digital invoicing specification and submitted to the FBR API with the seller's NTN or STRN, province and address. The response is stored on the invoice — FBR invoice number on success, the error code and message on rejection — and failed invoices can be corrected and retried. Sent invoices are locked from editing, and a settings page manages the API token, environment (sandbox scenario or production) and seller details.
For authentication, admins import product numbers and secret PINs in bulk from a CSV file. A public verification API checks a product number and PIN pair and records the date it was first verified, so buyers get an instant genuine or not-recognised answer.

What I shipped

Sales invoices with line items and automatic 18% sales tax calculation
FBR digital invoicing API integration — sandbox scenarios and production
FBR status per invoice: sent, failed with error code, or not sent
One-click submit and retry, with sent invoices locked from editing
FBR settings for API token, seller NTN / STRN, province and address
Filters by date range and FBR status
Bulk CSV import of product numbers and PINs
Public PIN verification API that records the first verification date

Screenshots

Invoice sent to FBR — line items, 18% sales tax and totals
FBR integration settings — API, seller NTN / STRN and sandbox scenario
Product PIN codes with verification dates

0 likes · 0 views · Nov 27, 2026

Built a Laravel app for submitting sales invoices to Pakistan’s FBR and letting buyers verify products with a PIN.

Tags