Technical Specification for Data Sharing through Software Fiscal Device from Textile and Leather sector with FBR

Print This Post Print This Post


The purpose of this article is to facilitate LEATHER AND TEXTILE SECTOR to understand methods for invoice data sharing with FBR. The software fiscal device will be installed on the same computer on which POS is installed. The Fiscal device will be integrated with POS system to fiscalize the invoice and returns Fiscal Invoice Number.

Figure 1 – Invoice Fiscalization Process

POS will be integrated with FBR as per following steps.

  • Register each POS in FBR system from which you want to upload the data. Details are given in Section POS Registration.
  • Download the software component from the eFBR website.
  • Install the software on the local computer (*internet connection is required for this step).
  • Taxpayer will integrate their system with FBR software component as per provided details in the Section Integration of Taxpayer System with FBR System.


The scope of the article is limited to technical description of FBR software fiscal device component. FBR Software Fiscal Device will reside on the same system where the POS is installed by the taxpayer. It will fiscalize each invoice generated through the POS on real time and generate unique fiscal invoice number for each invoice to print on receipt with QR code. Software fiscal device will periodically move recorded invoices data to FBR online system through an independent process.


FBR Federal Board of Revenue
TCP Transmission Control Protocol
NTN National Tax Number
POS_RN Point of Sale Registration Number

POS Registration

Textile and leather sector will register their POS for each branch using eFBR portal by providing the required data.

For POS registration, log in on web site with your user credential and get registered by accessing the page Registration à POS Client Registration

On successful submission of data, FBR will generate POS registration number which will be referenced in compiling each invoice into required format.

Figure 2- POS Registration

Following is the detail of required data for POS registration

Name Status Sample Value
POS Identification Number (Device No.) Compulsory POS-123-8D
NTN Compulsory 1000007-9
Business Name Compulsory IDEAS by Gul Ahmed
Branch Name Compulsory F-10 Markaz Outlet
Business Address Compulsory F-10 Markaz Islamabad
City Compulsory Islamabad
IP Address Optional
Latitude Compulsory 33.0254155
Longitude Compulsory 73.254354
Mode Compulsory Software Component
POS Version Compulsory 1.0

Integration of POS with FBR Software Fiscal Device

FBR has provided the local software fiscal device to textile and leather sector to share the invoice data with FBR. This component will be accessible only to registered POS Clients. Transaction handling and relevant data dissemination to FBR PRAL will be the responsibility of registered POS Clients. FBR will impose such restrictions so that no un-authorized POS Clients have access to the software fiscal device.

For the integration of taxpayer POS with FBR software fiscal device require following steps:

  1. Download the Software Fiscal Device from FBR Web Site. Clients who have old Software Fiscal Device component generating FBR Invoice Number are required to Download and Install the patch to fix their configuration settings.
  2. Install the Setup as instructed in section Installation of the FBR Software Fiscal Device
  3. After the installation, a Net.TCP/ Self Hosted Http service will be configured on following address bindings to be integrated with POS:
    • Net.TCP: net.tcp://localhost:8523/TcpService/IMSTcpmex
    • Http: http://localhost:8524/TcpService
    • Note: To verify the successful installation of fiscal service. Please confirm fiscalization service is up and running in the system services list (service.msc) as shown in Figure -3.
  4. Consume the local fiscal service (net.tcp://localhost:8523/TcpService/IMSTcpmex) in the POS according to given instruction in Section Steps of Integration for Net.TCP Service Consumption
  5. Consume the local fiscal service (http://localhost:8524/TcpService) in the POS according to given instruction in Section Steps of Integration for Http Service Consumption
  6. FBR service will return the invoice number against each record.
  7. The FBR Invoice number should be printed on the Customer invoice receipt along with QR Code.
  8. The invoice data will be periodically uploaded on FBR Servers by the Software fiscal device automatically.

Figure 3- Fiscalization Service

Installation of the FBR Software Fiscal Device

Following are the pre-requisites for the installation of Software Component.

  • Windows Based Operating System (Win 7 and above).
  • Internet information services (IIS) must be installed.
  • .Net Frame Work 4.5 or above required.
  • Installation User must have the administrator rights.

Following are the Steps for the installation of the FBR Software Component.

  1. Extract the file as mentioned in Figure – 4.
  2. Go to IMS Installer => IMS Fiscal Component and run theexe as administrator as shown in Figure – 6.
  3. Entry POSID, for Browse Service Path select the path as mentioned in Figure – 8.
    • Note: It is recommended to select the Drive other than C Drive for security purpose.
  4. Click ‘Install’ to complete the set up

Figure 4 – Extract zip file

Figure 5 – IExtracted folder structure


Figure 6 – Set Up

Figure 7 – Installation

Figure 8 – Directory and POS Registration Number

Steps for Integration of Software Fiscalization Component

FBR Software Fiscalization Device has provided two service modes  to users to consume the fiscal component and generate fiscal invoice number.

Net.TCP Service Mode

Add a service reference (net.tcp://localhost:8523/TcpService/IMSTcpmex) of software Fiscal device (provided by FBR, PRAL) in the POS.

Http Service Mode

Add a service reference (http://localhost:8524/TcpService) of software Fiscal device (provided by FBR, PRAL) in the POS.

Below are the steps to integrate the component,

1. Create TCP proxy object as follows

      TcpServiceClient service = new TcpServiceClient ();

2. On the Print Invoice Event method;

3. Call the following method to fiscalize the invoice on Print Event

      String fbrInvoiceNumber = service. GetFBRInvoiceNumberByModel(obj);

4. For close of the day summary

5. Call the following method to send Summary detail on close of the day Event

     String response = service. CloseOfDaySummary (obj);

Invoice Model Details

The fields of the invoice model are given below.

Name Data Type Status Sample Value
FBRInvoiceNumber varchar(30) Blank
POSID (POS Registration Number given by FBR on registration) bigint Compulsory 100000
USIN varchar(50) Compulsory 001897
RefUSIN varchar(50) Optional 001896
DateTime datetime Compulsory 2018-11-01 00:00:00.000
BuyerName varchar(150) Optional Shahzad Ahmed
BuyerPhoneNumber varchar(20) Optional 923001234567
TotalSaleValue double Compulsory 1000.00
TotalQuantity double Compulsory 10.00
TotalTaxCharged double Compulsory 6.0
Discount double Optional 10.00
TotalBillAmount double Compulsory 10.00
PaymentMode Int Compulsory
  1. Cash
  2. Card
  3. Gift Voucher
  4. Loyalty Card
  5. Mixed
  6. Cheque
InvoiceType Int Compulsory
  1. New
  2. Debit
  3. Credit
List<InvoiceItems> list Compulsory Table No 2

                                                                       Invoice Data 1

Table No. 2 (recursive, will contain multiple items record in an invoice)

Name Data Type Status Sample Value
ItemCode varchar(50) Compulsory 0001
ItemName varchar(150) Compulsory Blanket
PCTCode varchar(8) Compulsory 01011000
Quantity double Compulsory 1.00
TaxRate float Compulsory 6.0
SaleValue double Compulsory 1000.00
Discount decimal(18, 0) Optional 10.00
TaxCharged double Compulsory 100
TotalAmount double Compulsory 10.00
InvoiceType Int Compulsory
  1. New
  2. Debit
  3. Credit
RefUSIN Varchar Optional (In case of Credit or Debit Note)  


                                                                      Invoice Item 1

Return Fiscal Invoice Number

String will be returned by the Web Service.

FBRInvoiceNumber =11000120181112000369

Net Code Example: Fill the invoice object

Invoice obj = new Invoice ();

int POSID = 123456;

obj.FBRInvoiceNumber = string.Empty;

obj.USIN = “Test123”

obj.RefUSIN = “”;
obj.DateTime = “2018-11-01 00:00:00.000”;
obj.BuyerName = “Abdul Rauf”;
obj.BuyerPhoneNumber = “923001234567”;
obj.TotalBillAmount = 1000.00;
obj.TotalQuantity = 10.00;
obj.TotalSaleValue = 100;
obj.TotalTaxCharged = 60.00
obj.Discount = 10.0;

obj.InvoiceType = 1;

obj.PaymentMode = 1  // (1: Cash, 2: Card, 3: Gift voucher, 4: Loyalty card, 5:Mixed);

obj.Items = Items();

private List<InvoiceItems> Items()


List<InvoiceItems> lst = new List<InvoiceItems>();

InvoiceItems objItem = new InvoiceItems();

objItem.ItemCode = “12345”;
objItem.ItemName = “Test Name”;

objItem.PCTCode = 01011000;
objItem.Quantity =  10.00;

objItem.TaxRate =  10.00;

objItem.SaleValue =  100;

objItem.Discount = 10.0;

objItem.TaxCharged =  10.00;
objItem.TotalAmount =  10.00;

objItem.RefUSIN= string.Empty;

objItem.InvoiceType=1;  //(1:New, 2:Debit, 3:Credit, )


return lst;


Close of Day/Week/Month Summary Model Details

Name Data Type Status Sample Value
POSID bigint Compulsory 100000 (POS Registration Number given by FBR on registration)
BranchID varchar(50) Optional 001897
OpeningTotalQuantity Double Compulsory 12255.23
OpeningTotalValue Double Compulsory 85241.236
TotalPurchaseQuantity Double Compulsory 464.485
TotalPurchaseValue Double Compulsory 923001234567
TotalSaleValue double Compulsory 1000.00
TotalSoldQauntity double Compulsory 10.00
TotalSaleExlcudingSalesTax double Compulsory 6.0
TotalSalesTax double Compulsory 10.00
TotalSaleValueIncludingSalesTax double Compulsory 10.00
ClosingTotalQuantity double Compulsory 10.00
ClosingTotalValue double Compulsory 10.00
TotalInvoices Int Compulsory 12
Periodically Int Compulsory 1=Daily, 2=weekly, 3=Monthly
CloseOfDay Datetime Compulsory 2018-11-01 00:00:00.000

Return Summary Model Response

{“Message”:”Summary Received Successfully”, “Errors”:[]}

{“Message”:” Internal Process Error”, “Errors”:[]}

Net Code Example: Fill the Summary Model object

serviceModel.Summary obj = new serviceModel.Summary();

obj.POSID = 110014;

obj.BranchID = 0;

obj.OpeningTotalQuantity = 5000;

obj.OpeningTotalValue = 500000;

obj.TotalPurchaseQuantity = 10000;

obj.TotalPurchaseValue = 1000000;

obj.TotalSoldQauntity = 3500;

obj.TotalSaleExlcudingSalesTax = 340000;

obj.TotalSalesTax = 100000;

obj.TotalSaleValueIncludingSalesTax = 440000;

obj.ClosingTotalQuantity = 5000;

obj.ClosingTotalValue = 9888;

obj.TotalInvoices = 598;

obj.Periodically = 1;


Technical Support:

Leave a Reply

Your email address will not be published. Required fields are marked *

three × four =