Fully updated to comply with the FBR Pakistan Technical Specification for Digital Invoicing API (Version 1.12). Features camelCase JSON payload serialization, real-time posting, pre-validation checks, offline queue resilience, and 1.0" thermal receipt QR printing.
Built according to PRAL technical specifications for real-time tax invoice verification.
Direct transmission of retail transactions to FBR PRAL Sandbox/Production endpoints (postinvoicedata) with instant status confirmation.
Built-in pre-validation engine (validateinvoicedata) to audit HS Codes, UOM, tax rates, and buyer details before finalizing orders.
Invoices generated offline store unique USIN codes locally, issue printable thermal receipts, and queue for automated sync via cron_fbr_sync.php.
Complies with PRAL 1.0" x 1.0" (96px x 96px) QR Code specs (Version 2.0 25x25) embedding FBR Invoice numbers and USIN validation links.
The invoicing software automatically targets official FBR PRAL Digital Invoicing endpoints based on your environment setting in config.php.
https://gw.fbr.gov.pk/di_data/v1/di/postinvoicedata_sb
https://gw.fbr.gov.pk/di_data/v1/di/validateinvoicedata_sb
https://gw.fbr.gov.pk/di_data/v1/di/postinvoicedata
{
"invoiceType": "Sale Invoice",
"invoiceDate": "2026-08-10",
"sellerNTNCNIC": "0786909",
"sellerBusinessName": "Company 8",
"sellerProvince": "Punjab",
"sellerAddress": "Suite 404, Main Boulevard, Gulberg III",
"buyerNTNCNIC": "1000000000000",
"buyerBusinessName": "Walk-in Customer",
"buyerProvince": "Punjab",
"buyerAddress": "Lahore",
"buyerRegistrationType": "Registered",
"invoiceRefNo": "",
"scenarioId": "SN001",
"items": [
{
"hsCode": "0101.2100",
"productDescription": "Cotton Shirt Regular Fit",
"rate": "18%",
"uoM": "Numbers, pieces, units",
"quantity": 1.0,
"totalValues": 2950.0,
"valueSalesExcludingST": 2500.0,
"fixedNotifiedValueOrRetailPrice": 0.0,
"salesTaxApplicable": 450.0,
"salesTaxWithheldAtSource": 0.0,
"extraTax": 0.0,
"furtherTax": 0.0,
"sroScheduleNo": "",
"fedPayable": 0.0,
"discount": 0.0,
"saleType": "Goods at standard rate (default)",
"sroItemSerialNo": ""
}
]
}
Full support for official FBR testing scenario codes (Section 9, Page 46).