0% found this document useful (0 votes)
37 views20 pages

AJK POS Technical Document

This document outlines the technical specifications for a software fiscal component designed to facilitate data sharing between Tier 1 retailers' Point of Sale (POS) systems and the AJK Inland Revenue Department (AJK IRD). It emphasizes real-time integration, automatic invoice uploading, and seamless compliance with tax regulations, while providing detailed steps for POS registration and integration. The solution aims to enhance operational efficiency and transparency in tax reporting for retailers in Azad Jammu & Kashmir.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views20 pages

AJK POS Technical Document

This document outlines the technical specifications for a software fiscal component designed to facilitate data sharing between Tier 1 retailers' Point of Sale (POS) systems and the AJK Inland Revenue Department (AJK IRD). It emphasizes real-time integration, automatic invoice uploading, and seamless compliance with tax regulations, while providing detailed steps for POS registration and integration. The solution aims to enhance operational efficiency and transparency in tax reporting for retailers in Azad Jammu & Kashmir.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

TECHNICAL SPECIFICATION FOR DATA SHARING THROUGH

SOFTWARE FISCAL COMPONENT FROM TIER 1 RETAILER WITH AJK (PRAL)

VERSION 1.0

Version Number:1.0 PRAL © 2025 All rights reserved Page 1 of 20


POS AJK Technical Document

DOCUMENT INFORMATION

Category Information
Document Technical Document
Project-Module Title Technical Specification for Data Sharing Software Component from Tier 1
Retailer POS Clients to AJK (PRAL) Version 1.0
Version 0.1
Author Adeel Ahmed Abbasi (POS/Team Lead)
Status
Reviewer(s) Sohail Anjum (Senior System Analyst, Manager SA&D)
Review Date
Approver Mehboob -Ur- Rehman (Senior Manager - Development)
Issue Date 07-02-2025
Distribution SD Wing
Document Category Internal External
Privacy Level Public PRAL Confidential Customer Confidential
Disclaimer This document contains confidential information. Do not distribute this
document without prior approval from PRAL.

Version Number: 0.1 PRAL © 2025 All rights reserved Page 2 of 21


POS AJK Technical Document

1. INTRODUCTION

Efficient tax compliance is a cornerstone of modern financial regulation, and our POS Integration
Solution is designed to help retailers in Azad Jammu & Kashmir (AJK) meet tax requirements
effortlessly. By directly connecting their Point of Sale (POS) systems to the AJK Inland Revenue
Department (AJK IRD), this solution enables smooth, real-time sharing of sales data to ensure full
compliance with all tax rules.

Our solution is highly flexible, offering both locally installed and cloud-based options that easily
integrate into existing POS setups. With its seamless design, it guarantees zero disruption to ongoing
business operations while enhancing compliance efficiency.

2. KEY FEATURES INCLUDE:

• Real-Time Integration: Instantly and accurately submits sales data to the AJK IRD system.

• Automatic Invoice Uploading: Reduces manual input, minimizes errors, and streamlines tax
reporting.

• Dual Environment Support: Provides both production and sandbox environments to ensure
smooth testing and implementation.

• High Availability and Speed: Delivers 99.9% uptime with response times in milliseconds for
uninterrupted operation.

This system is designed to adapt to evolving regulatory frameworks, prioritizing efficiency,


transparency, and scalability. Automating compliance processes, frees businesses from the
administrative burden of tax reporting, enabling them to focus on growth while adhering to tax
regulations with ease and precision.

Our next-generation technology reflects a commitment to simplifying tax enforcement, fostering a


culture of compliance, and driving operational excellence, making it an indispensable tool for modern
retailers. This proposal introduces a solution to empower businesses while supporting tax authorities
in achieving transparent and efficient tax collection.

3. POS WILL BE INTEGRATED WITH AJK AS PER THE FOLLOWING STEPS.

• Register each POS in the AJK system from which you want to upload the data. Details are
given in Section POS Registration.
• Download the software component from the AJK IRD website
• Install the software on the local computer (*internet connection is required for this step).
• Taxpayer will integrate their system with AJK-IRD software component as per the provided
details in the Section Integration of Taxpayer System with AJK-IRD System.
Version Number: 0.1 PRAL © 2025 All rights reserved Page 3 of 21
POS AJK Technical Document

Figure 1 – POS Integration

4. PURPOSE.

The purpose of this proposal is to introduce a robust and efficient solution that enables seamless tax
compliance for retailers in Azad Jammu & Kashmir (AJK). The POS Integration Solution is designed
to connect retailers' Point of Sale (POS) systems with the AJK Inland Revenue Department (AJK IRD),
facilitating real-time, automated sharing of sales data.

This solution aims to simplify the compliance process by minimizing manual effort, reducing errors,
and ensuring accurate tax reporting. It integrates seamlessly into existing POS setups without
disrupting business operations, promoting transparency and trust between retailers and tax authorities.

By leveraging advanced technology, the system adapts to evolving tax regulations, offering retailers a
scalable and reliable tool to meet compliance requirements. This proposal highlights how the solution
will streamline operations, enhance efficiency, and support both retailers and tax authorities in
achieving effective and transparent tax collection.

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

Version Number: 0.1 PRAL © 2025 All rights reserved Page 4 of 21


POS AJK Technical Document

6. POS REGISTRATION.

Tier 1 Retail sector will register their POS for each branch using the AJK portal by providing the
required data. On successful submission of data, the AJK IRD system will generate a POS registration
number which will be referenced in compiling each invoice into the required format.

For POS registration, log in on the website https://iris.ajkird.gov.pk/public/txplogin.xhtml with your


user credential and get registered by accessing the → POS Registration

Figure 2 – POS Registration

6.2 BUSINESS INFORMATION.

In the Business Information menu, users are required to enter details about their business and brand.
Additionally, they must select the appropriate registration option based on their business nature and
invoice generation requirements.

Figure 3 – POS Registration – Business Information

Version Number: 0.1 PRAL © 2025 All rights reserved Page 5 of 21


POS AJK Technical Document

6.3 Contact Information.

In the Contact menu, users are required to enter the details of the Technical or Focal Person. This
information ensures seamless coordination, support, and issue resolution when needed.

Figure 4 – POS Registration - Contact Information

6.4 Branch Information.

In the Branch menu, users are required to enter the details of the branch where the POS Till Machines
will be installed. Additionally, they must provide the information of the Technical Person responsible
for offering technical support at that branch. This ensures that each branch has the necessary technical
resources for the proper functioning and maintenance of the POS system. At the same time the taxpayer
will provide the latitude and longitude details of each branch.

Figure 5 – POS Registration – Branch Information

Version Number: 0.1 PRAL © 2025 All rights reserved Page 6 of 21


POS AJK Technical Document

6.5 Pos Details.

In the POS Detail menu, users are required to select the Branch and provide the Till Machine details,
such as the unique POS Identification Number, Local IP, and MAC Address of the machine
associated with the generated POS ID. This information must be accurate to ensure proper
configuration and functionality of the POS system on that specific machine.

Figure 6 – POS Registration – POS Details

6.6 Technical Details.

The Technical Detail menu requires users and software integrators to provide essential information
about the software integrated with the POS AJK System. Additionally, users must enter Software
Vendor Information, ensuring proper identification of the vendor responsible for the integration.

Figure 7 – POS Registration – Technical Details

Version Number: 0.1 PRAL © 2025 All rights reserved Page 7 of 21


POS AJK Technical Document

6.7 API MGT.

The API Management (API MGT) menu provides access to sandbox-related information for both
Cloud-Based Integrations and Offline IMS Fiscal Component (Non-Cloud) Integrations. Within
this menu, users and software integrators can find details about the Sandbox API, Sandbox Token,
and POSID, which are essential for testing

Figure 8 – POS Registration – API MGT

7. Integration of POS with AJK Software Fiscal Component.

The AJK-IRD has provided a local software fiscal component to the Tier 1 Retail sector for sharing
invoice data with the AJK-IRD. This component will be accessible only to registered POS clients.
Transaction handling and the dissemination of relevant data to PRAL will be the responsibility of the
registered POS clients.

To facilitate taxpayers, two separate environments will be made available:

1. Sandbox Environment – for testing and validation of integration.


2. Production Environment – for live transactions, both Cloud-Based and Component-Based.

These environments are designed to ensure seamless integration and secure processing of transactions
in compliance with AJK-IRD regulations.

8. Integration of POS with AJK Software Fiscal Component.

To integrate the taxpayer POS with the AJK-IRD Software Fiscal Component, the following steps
are required:

1. Download the Software Fiscal Component


Download the setup from the AJK-IRD website: AJK-IRD Software Fiscal Component
2. Install the Setup
Follow the installation instructions provided in the section Installation of the AJK-IRD
Software Fiscal Component.
3. Verify the Service
After installation, a self-hosted HTTP service will be configured at the following address:

Version Number: 0.1 PRAL © 2025 All rights reserved Page 8 of 21


POS AJK Technical Document

http://localhost:8524/api/IMSFiscal/get
It will display the message "Service is responding."

Note: To confirm the successful installation of the fiscal service, check that the fiscalization service
is running in the System Services List (service.msc), as shown in Figure 9.

4. Consume the Local Fiscal Service


Integrate and consume the local fiscal service in the POS using the provided instructions in
the section Steps of Integration for Service Consumption.
Service URL: http://localhost:8524/api/IMSFiscal/GetInvoiceNumberByModel
5. Invoice Number Generation
The AJK-IRD service will return an invoice number for each record submitted by the POS.
6. Invoice Data on Customer Receipt
The AJK-IRD invoice number must be printed on the customer invoice receipt, along with
a QR Code.
7. Automatic Data Upload
The AJK-IRD Software Fiscal Component will automatically upload the invoice data to the
AJK-IRD servers.

Figure 9 – POS - Fiscalization Service

Version Number: 0.1 PRAL © 2025 All rights reserved Page 9 of 21


POS AJK Technical Document

9. Installation of the AJK-IRD Software Fiscal Component.

9.1. Pre-Requisites for Installation

Before installing the AJK-IRD Software Fiscal Component, ensure the following pre-requisites
are met:
• Windows-Based Operating System (Windows 10 and above).
• Internet Information Services (IIS) must be installed.
• .NET Framework 4.5 or above is required.
• The installation user must have administrator rights on the system.

9.2. Steps for Installation of the AJK-IRD Software


Fiscal Component
1. Run the Setup (Right-click on Setup.exe and select Run as Administrator) as shown in
Figure 4.

Figure 10 – POS – Installation

Select Installation Type (Choose the Complete radio option and click Next)

Figure 11 – POS – Installation

Version Number: 0.1 PRAL © 2025 All rights reserved Page 10 of 21


POS AJK Technical Document

2. Enter Required Information


During the installation, the setup will prompt for the following information:
o POS ID (issued at the time of POS Registration)
o Access Code
o Test/Production selection
o Target Folder As shown in Figure 12, provide the required details.

3. Select Target Folder


Click the Change Button and choose the folder where the software component will generate
local files.
Note: It is recommended to select a drive other than the C Drive for security purposes.

Enter POS ID and above-mentioned information and press Next.

Figure 12 – POS – Installation

Complete Setup - Click Finish to complete the installation setup.

Version Number: 0.1 PRAL © 2025 All rights reserved Page 11 of 21


POS AJK Technical Document

10. Invoice Model Detail

Name Data Type Status Sample Value


InvoiceNumber Varchar (30) Blank
POSID (POS Registration Number bigint Compulsory 100000
given by AJK-IRD on registration)
USIN Varchar (50) Compulsory 001897
RefUSIN Varchar (50) Compulsory 001896
In the case of
Credit Note
DateTime DateTime Compulsory 2025-02-18 00:00:00.000

BuyerName Varchar (150) Optional Shahzad Ahmed


BuyerNTN Varchar (9) Optional 1234567-8
BuyerCNIC Varchar (13) Optional 1111122222223
BuyerPhoneNumber Varchar (20) Optional 923001234567
TotalSaleValue double Compulsory 1,298 (Sum of Item Sales
Values) Exclusive of Tax and
Discount
TotalTaxCharged double Compulsory 221 (Sum of Item Tax)
TotalQuantity double Compulsory 15 (Count of Total Items)
Discount double Optional 380 (Sum of Item Discount)
FurtherTax double Optional 0.00 (Sum of Further Tax)
TotalBillAmount double Compulsory 1,519
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

Version Number: 0.1 PRAL © 2025 All rights reserved Page 12 of 21


POS AJK Technical Document

Invoice Model Detail - 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 (Should be less than or equal to 8)
(Pakistan Customs Tariff Code)
https://www.fbr.gov.pk/categ/customs-
tariff/51149/70853/131188
Quantity double Compulsory 1.00
TaxRate float Compulsory 18
SaleValue double Compulsory 1,298 (Actual Sale Price on which Tax
Calculated) Exclusive of Tax and Discount
Discount double Optional 380.00
FurtherTax double Optional 0.00
TaxCharged double Compulsory 221 (Actual Tax)
TotalAmount double Compulsory 1,519
InvoiceType Int Compulsory 1. New
3. Credit
11. 3rd Schedule New
12. 3rd Schedule Credit
139. Sales of goods against SRO 297(I)/2023
( If an item falls under 3rd schedule category,
then use 11 for new item and use 12 for 3rd
schedule item return invoice. )
RefUSIN Varchar Optional (In case of 001897
Credit or Debit Note)

Return Fiscal Invoice Number


JSON Response string from AJK-IRD Web API

{\"AJK-IRDInvoiceNumber\":0000025021812000369,\"Response\":\"Invoice received
successfully\",\"Code\":\"100\”}

Version Number: 0.1 PRAL © 2025 All rights reserved Page 13 of 21


POS AJK Technical Document

11. .NET CODE EXAMPLE.

Invoice objInv = new Invoice();


objInv.AJK-IRDInvoiceNumber = string.Empty;
objInv.POSID = 123123;
objInv.USIN = "123457";
objInv.DateTime = DateTime.Now;
objInv.BuyerNTN = "1234567-9";
objInv.BuyerCNIC = "12345-1234567-8";
objInv.BuyerName = "Buyer Name
objInv.BuyerPhoneNumber = "0345-1234567";
objInv.PaymentMode = 1;
objInv.TotalSaleValue = 0;
objInv.TotalQuantity = 0;
objInv.TotalBillAmount = 0;
objInv.TotalTaxCharged = 0;
objInv.Discount = 1000;
objInv.FurtherTax = 100;
objInv.InvoiceType = 1;
objInv.Items = Items();

private List<InvoiceItems> Items()


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

InvoiceItems objItem = new InvoiceItems();


objItem.ItemCode = "0000";
objItem.ItemName = "Item Name";
objItem.Quantity = 3;
objItem.TotalAmount = Convert.ToDouble(3000.00);
objItem.SaleValue = Convert.ToDouble(3180);
objItem.TaxCharged = Convert.ToDouble(180);
objItem.TaxRate = 6;
objItem.PCTCode = "11001010";
objItem.FurtherTax = 20;
objItem.InvoiceType = 1;
objItem.Discount = 500;
lst.Add(objItem);

return lst;
}

Version Number: 0.1 PRAL © 2025 All rights reserved Page 14 of 21


POS AJK Technical Document

12. WEB CLIENT TO POST DATA ON PROVIDED LOCAL URL AND GET RESPONSE

Below code is used to call the WebAPI. JSON string is passed to the function along with API URL to
which data is being posted.

using System.Net.Http;
using Newtonsoft.Json;

HttpClient Client = new HttpClient();


var content = new StringContent(JsonConvert.SerializeObject(objinvoice), Encoding.UTF8,
"application/json");
HttpResponseMessage response =
Client.PostAsync("http://localhost:8524/api/IMSFiscal/GetInvoiceNumberByModel",
content).Result;

if (response.IsSuccessStatusCode)
{
Console.WriteLine("Response from API");
Console.WriteLine("---------------------------------------------");
Console.WriteLine(response.Content.ReadAsStringAsync().Result);
}

13. WEB CLIENT TO POST DATA FROM CLOUD AND GET RESPONSE.

The following code is an example of how to call a WebAPI, passing a JSON string along with the
API URL to which the data is being posted.

Sandbox URL:
https://gw.fbr.gov.pk/ajkposdsandbox/v1/postinvoicedata
Sandbox Token: 7ddff49d-246c-3e96-9d79-2117a62ae862

Production URL:
https://gw.fbr.gov.pk/ajkposd/v1/postinvoicedata
Note (Production Token is issued at the time of POS Registration and can be accessed within the POS Clients
Menu on the IRIS-AJK Portal).

using System.Net.Http;
using System.Net.Http.Headers;
using Newtonsoft.Json;
using System.Text;

// Create HttpClient instance


HttpClient client = new HttpClient();

// Set Authorization header using Bearer token

Version Number: 0.1 PRAL © 2025 All rights reserved Page 15 of 21


POS AJK Technical Document

client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "7ddff49d-246c-3e96-9d79-


2117a62ae862");

// Convert the object 'objinvoice' into a JSON string


StringContent content = new StringContent(JsonConvert.SerializeObject(objinvoice), Encoding.UTF8,
"application/json");

// Disable SSL certificate validation (use cautiously, avoid in production)


System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };

// Send POST request to the API endpoint


HttpResponseMessage response = await client.PostAsync ("https://gw.fbr.gov.pk/ajkposdsandbox/v1/postinvoicedata",
content).Result;

// Check if the response is successful


if (response.IsSuccessStatusCode)
{
// If successful, display the response
Console.WriteLine("Response from API");
Console.WriteLine("---------------------------------------------");
Console.WriteLine(response.Content.ReadAsStringAsync().Result);
}
else
{
// If the response is not successful, handle the failure
Console.WriteLine("Error in API call");
Console.WriteLine("Status Code: " + response.StatusCode);
}

14. SAMPLE JSON BODY FOR POST REQUEST

{
"InvoiceNumber":"",
"POSID":"500001",
"USIN":"FBR_TEST_SUb",
"DateTime":"2025-02-09 02:52:00",
"BuyerNTN":"1234567-8",
"BuyerCNIC":"1234512345678",
"BuyerName":"Buyer Name",
"BuyerPhoneNumber":"0000-0000000",
"TotalBillAmount":1.0,
"TotalQuantity": 1.0,
"TotalSaleValue":1.0,
"TotalTaxCharged":1.0,
"Discount":0.0,
"FurtherTax":0.0,
"PaymentMode":1,
"RefUSIN":"123456",
"InvoiceType":1,
"Items":[
Version Number: 0.1 PRAL © 2025 All rights reserved Page 16 of 21
POS AJK Technical Document

{
"ItemCode":"IT_1011",
"ItemName":"Test Item",
"Quantity":1.0,
"PCTCode":"11001010",
"TaxRate": 18,
"SaleValue": 1.0,
"TotalAmount":1.0,
"TaxCharged":1.0,
"Discount": 1.0,
"FurtherTax":0.0,
"InvoiceType":11,
"RefUSIN":null
},
{
"ItemCode":"IT_1012",
"ItemName":"Test Item",
"Quantity":1.0,
"PCTCode":"11001010",
"TaxRate":1.0,
"SaleValue":1.0,
"TotalAmount":1.0,
"TaxCharged":1.0,
"Discount":1.0,
"FurtherTax":1.0,
"InvoiceType":13,
"RefUSIN":null
}

]
}

Version Number: 0.1 PRAL © 2025 All rights reserved Page 17 of 21


POS AJK Technical Document

15. End-Point GET Request.

Open new tab in Postman and write URL: http://localhost:8524/api/IMSFiscal/Get . Now click send
button to check the response from the Fiscalization Service.

Figure 13 – POS – POSTMAN - Check IMS Service Response


Response:
[
"Service is responding"
]

16. End-Point POST Request.

Open new tab in Postman and write URL:


http://localhost:8524/api/IMSFiscal/GetInvoiceNumberByModel
Change type from Get to POST and then Select raw radio button on Postman and change Text to
JSON. Add the sample json mention in section 7.2.2 Sample JSON Format to POST to IMS
Component.
Now click send button to check the response from the Fiscalization Service.

Version Number: 0.1 PRAL © 2025 All rights reserved Page 18 of 21


POS AJK Technical Document

Figure 13 – POS – POSTMAN - Post Data to Fiscalization Service

Response:
{
"InvoiceNumber": "0000002502072444901",
"Code": "100",
"Response": "Fiscal Invoice Number generated successfully.",
"Errors": null
}

17. Uninstalling the Sandbox Component Before Installing the Live Component.

To ensure a proper uninstallation of the Sandbox component before installing the component for
LIVE/Production Environment, follow the steps below. Do not uninstall the IMS component
from the Control Panel to avoid incomplete removal.

1 Steps for Proper Uninstallation:


1. Run Setup.exe as Administrator (Right-click on Setup.exe and select Run as
Administrator)

2. A prompt will ask whether you want to perform an upgrade. Click "Yes" to proceed.

3. Proceed with Setup Click Next on the wizard screen to move forward.

4. Program Maintenance Screen - In the Program Maintenance screen, select the “Remove”
radio button. Then, press the Remove button on the next wizard screen to begin the
Version Number: 0.1 PRAL © 2025 All rights reserved Page 19 of 21
POS AJK Technical Document

uninstallation process. This will properly remove the component from the system.

5. Finish the Uninstallation - Close the wizard by clicking the Finish button. The sandbox
component has now been successfully uninstalled.
By following these steps, you ensure that the Sandbox component is removed properly and is ready
for the installation of the Live component.

18. Technical Support:

• Email: [email protected]
• Phone: 05827927306

Version Number: 0.1 PRAL © 2025 All rights reserved Page 20 of 21

You might also like