Mapping your ERP’s tax codes to what FBR actually checks
Every accounting system stores tax its own way, and none of them stores it the way FBR asks for it. The fix is a one-time job: matching each of your tax codes to an FBR sale type (the mapping). Here is what it contains, where it goes wrong, and how to test it.

Answer first. FBR does not accept “tax: 18%” on an invoice line. It wants a sale type, a rate in FBR’s own wording, and an HS code that fits that sale type. It wants a unit of measure from FBR’s list. And when the rate isn’t the standard one, it wants the SRO schedule and item serial that allow it. Your accounting system holds tax codes, tax rates and ledgers instead. A small set of tables translates one into the other: tax code to sale type, item to HS code and unit, customer to registration type and province. Build the tables once, put dates on them, and test them with FBR’s validation check before you send any invoice.
What FBR checks on every line
An FBR digital invoice has a header (who is selling, who is buying, the date and the document type) and one entry for each line. The tax rules sit on each line, and FBR checks every line field by field:
- HS code. Pakistan’s eight-digit PCT code, from FBR’s own list, written the way FBR shows it (for example
0101.2100). Services use Chapter 98 codes in the same field. - Sale type. What kind of sale this is: goods at the standard rate, at a reduced rate, zero-rated, exempt, Third Schedule retail-price goods, and so on.
- Rate. Text, not a number, and not always a percentage. FBR’s rates include values such as “18% along with rupees 60 per kilogram”.
- SRO schedule and item serial. Needed whenever the rate is not the standard one. If you name an SRO, you must give its item serial too.
- Unit of measure. FBR’s wording, from FBR’s list. Which units FBR accepts depends on the HS code.
- Values. Quantity, value excluding sales tax, the sales tax itself, and the other tax fields (further tax, extra tax, FED payable, tax withheld at source and discount), each in the form FBR expects.
The buyer’s details matter to the line too. Whether the buyer is registered or unregistered changes what FBR expects. And the seller’s province is part of how FBR decides the rate.
Why a flat 18% breaks
A tempting shortcut in a first integration is to send every line at the standard rate, with 18% fixed in the code. It works until the first reduced-rate, zero-rated or exempt line. Then every such invoice is rejected, or worse, accepted at the wrong rate.
Your system should not guess the rate. FBR publishes a rate lookup based on three things: the invoice date, the sale type and the supplier’s province. The HS code is not one of them. So the right set-up stores the sale type with your tax code or item. It then asks FBR which rate applies to that sale type on that date. Don’t store a percentage and hope it is still right.
The HS code still has to agree with the sale type. A mismatch between the two is the most common rejection seen while connecting a system: error 0052 in FBR’s list. The classic cause is simple. The product list and the tax codes were matched by different people who never compared notes.
The three tables you need
However your system stores tax, the matching comes down to three tables. Keep them separate, and they stay easy to maintain.
1. Tax treatment: your tax code → FBR sale type
One row for each tax code (or tax rate, or tax ledger) your system uses on sales. Each row gives the FBR sale type. Where the tax treatment is not standard, it also gives the SRO schedule and item serial. For example, a reduced-rate code for one class of items matches “Goods at Reduced Rate” with its SRO. Your standard output tax code matches the standard-rate sale type, with no SRO at all.
2. Items: your product → HS code and unit
One row for each product. Better still, one row for each product group, with exceptions for single products. Each row gives the HS code and the FBR unit to use for that code. Store the HS code as text, exactly as FBR’s list shows it. A number field drops the leading zero on chapters 01 to 09, and FBR needs that zero. Your system’s own unit codes, such as PCS, NOS or KGS, are not FBR’s wording and must be translated.
3. Customers: your customer → registration type and province
One row for each customer you invoice. It holds the NTN or 13-digit CNIC as plain digits, whether FBR treats them as registered or unregistered, and their province (a province, not a city). You can look up the registration type from FBR using the number, and save it. It changes rarely, but it does change.
Where tax lives in your system
The first table is where systems differ most, because each one handles tax differently. The table below shows where to start in your system, and what you will need to add. The guide for each system goes further.
| System | Where to start | What’s missing |
|---|---|---|
| SAP | Tax codes on billing documents | HS code per material, FBR unit, buyer registration type |
| Odoo | Taxes (Odoo’s Pakistan localization gives a starting set from version 15), and fiscal positions that swap them for each customer | FBR sale type, SRO references, FBR unit wording |
| Tally | Tax ledgers under Duties & Taxes, posted once per voucher | HS code, sale type and SRO per line; buyer registration type |
| QuickBooks | Tax rates and tax codes set up by hand | HS code, FBR unit, sale type, buyer registration type |
| NetSuite | Tax codes (or SuiteTax settings) | Any Pakistan FBR set-up: you add the fields as custom fields |
| Business Central | VAT posting groups on customers and items | FBR sale type, SRO, HS code, FBR unit |
| Zoho Books | Taxes and tax groups | HS code, FBR unit, sale type, buyer registration type |
One pattern repeats in every row. The system knows a rate but not a sale type. It knows its own unit but not FBR’s. That is why every business needs this matching, whichever system it runs.
The fields people get wrong
- Tax-inclusive prices. Many systems let you enter prices including tax. FBR wants the value excluding sales tax on each line. So take the tax out the same way every time, and make sure the lines still add up to the invoice total after rounding.
- Tax withheld at source. FBR expects this to be either zero or the full sales tax on the line. A part amount is rejected.
- “Not applicable” versus zero. FBR treats a tax that doesn’t apply differently from a tax that applies at zero. Send a blank where FBR expects a zero, or the reverse, and the invoice is rejected.
- Third Schedule goods. For goods sold at a printed retail price, tax is worked out on the notified retail price, not the sale value. The retail price goes in its own field.
- Further tax. Sales to unregistered buyers can attract further tax. Your tables need a clear rule for when it is added, and at what rate.
- Units that don’t fit the HS code. Some HS codes accept only one unit. A unit that is fine in general can still be rejected for a particular code.
Our guide to FBR error codes lists the rejection each of these causes. So when a test fails, you can trace it straight back to the table that needs fixing.
Testing it against FBR
Your tables are only right when FBR agrees with them. Two tools make that easy to find out.
- FBR’s validation check. It takes the invoice you would send, runs every check a live invoice gets, and reports the same errors. But it records nothing and issues no number. Run a mix of real invoices through it: at least one for each tax code, plus a reduced-rate line, a zero-rated line, an unregistered buyer and a multi-line invoice with a discount.
- FBR’s test system (the sandbox). Each business gets its own set of test scenarios. Passing them is what unlocks the production token for live invoicing. The scenarios test exactly the combinations your tables have to get right.
With eInvoicePro, the reference lists FBR publishes are available directly: HS codes, the units valid for each code, and the rate and SRO fields for each sale type. So you check your tables against FBR’s own data, not a spreadsheet someone downloaded months ago.
Keeping it current
Rates change with Finance Acts, and SROs are issued and withdrawn. That is exactly why FBR’s rate lookup depends on the date. Three habits keep your tables from drifting out of date:
- Store the sale type, not the rate. Let FBR’s lookup give the rate for the invoice date. Then a rate change doesn’t mean changing your tables.
- Put dates on your SRO rows. An SRO reference that was valid last year can be the reason an invoice fails this year.
- Catch new items before they reach FBR. A new product with no HS code should stop at your own check with a clear message. It should not reach FBR and get rejected after the customer has left.
Who decides what matters too. The software holds your tables and checks them against FBR’s lists. But choosing an HS code, or deciding that a sale is reduced-rate, is a judgement for someone who knows the products. FBR does not check that an HS code really describes what you sold. So a wrong code can pass FBR’s check and still be wrong.
FAQs
Can’t we just send the rate our system calculated? You can send it, but FBR checks it against the rate for that sale type, date and supplier province. Store the sale type and take the rate from FBR’s lookup instead. That avoids a whole group of rejections and handles rate changes without changing any code.
Where should these tables live: in our ERP or outside it? Either works. Some systems make it easy to add custom fields for HS code and sale type. Others, like Tally, are best left untouched, with the tables kept alongside. What matters is that there is one set of tables, that it has dates on it, and that new items are caught before they reach FBR.
Does the HS code decide the tax rate? No. The rate comes from the sale type, invoice date and supplier province. The HS code must fit the sale type, so a wrong code can block a rate, but it does not set one.
How many invoices should we test before going live? At least one for each tax code you use, plus the tricky ones: a reduced-rate line, a zero-rated line, an unregistered buyer, a discount and a multi-line invoice. Then pass the test scenarios FBR gives your business.
Do services need an HS code too? Yes, a Chapter 98 code in the same field. Many services, though, are not FBR’s at all: the provinces tax them instead, through PRA, SRB, KPRA or BRA.
Related reading: PCT and HS codes for FBR invoicing, connecting your ERP to FBR and moving from FBR’s test system to live.
Ready to simplify your FBR digital invoicing?
Join 2000+ businesses that use eInvoicePro to make invoices and send them to FBR.