FBR Digital Invoicing Error Codes: The Complete Reference (0001–0402)
Over 80 FBR Digital Invoicing sales error codes (0001–0402) in one list: what each one means, why it fires and how to fix it. Updated November 2026.
What are FBR digital invoicing error codes?
Updated November 2026. By the Digi Invoice team at S.M. Raheel & Company — tax advocates, Faisalabad.
In short: an FBR digital invoicing error code is a four-digit number FBR sends back when it rejects an invoice. The code tells you which field is wrong. This page lists the sales codes from 0001 to 0402, with the cause and the fix for each group.
FBR digital invoicing error codes come from PRAL's Technical Specification for DI API, version 1.12 (the rule book for software that sends invoices to FBR). Its sales error table lists more than 80 codes, from 0001 to 0402. A separate purchase table lists 22 codes, from 0156 to 0177. PRAL added codes 0401 and 0402 on 24 July 2025, the newest entry in the document's change log.
Each code has a short message and a longer note. For example, PRAL's note for code 0034 reads: "Debit/Credit note can only be added within 180 days of original invoice date." The full table is in section 7 of the official PDF: https://download1.fbr.gov.pk/Docs/20257301172130815TechnicalDocumentationforDIAPIV1.12.pdf
How FBR reports an error
Every response from the Digital Invoicing API carries a validationResponse with a statusCode: 00 means Valid, 01 means Invalid. Errors surface at two levels. An invoice-level failure (a bad header field such as the seller registration or the date) returns errorCode and error text at the top with invoiceStatuses set to null. An item-level failure returns statusCode 00 or 01 per line inside invoiceStatuses, so a five-item invoice can pass four lines and reject one — the whole invoice still fails to post until that line is fixed.
The error text FBR returns is short and often generic, which is why the four-digit code matters more than the message. The sections below group the sales-module codes the way they fail in practice: identity and format, invoice type and sale type, debit notes, SRO and schedule requirements, tax calculation, and authorisation.
Which FBR digital invoicing errors happen most, and how do I avoid them?
Most FBR digital invoicing rejections come from three mistakes. The tax fields do not fit the sale type. A debit note does not point to the right original invoice. Or an identifier, such as an NTN (National Tax Number) or HS code (the customs code for the goods), is in the wrong format. Each mistake has its own group of codes in PRAL's v1.12 table.
Mistake 1 is tax that does not fit the sale type. Code 0091 fires when you send extra tax on reduced-rate, zero-rated, exempt or non-adjustable goods. Leave the extra tax field empty, not 0. Codes 0102 to 0105 fire when your sales tax does not match FBR's own sum. Let the software work out the tax from the rate, and round money to 2 decimals.
Mistake 2 is a debit note with a bad reference. Code 0026 means the original invoice number is missing. Code 0057 means FBR cannot find that number. Code 0034 means the note is more than 180 days after the original invoice. Always raise the note from the original invoice, so the number and date are copied, not typed.
Mistake 3 is an identifier in the wrong format. Code 0002 means the buyer number is wrong. PRAL's note asks for a CNIC (the 13-digit national identity card number) or an NTN of 7 or 9 digits, with no dashes. Code 0099 means the unit of measure does not match the HS code. Pick the unit from FBR's HS_UOM list, not from memory.
A worked example: a shop posts a 5-line invoice. Line 3 is a zero-rated item, and the extra tax field says 0. FBR returns statusCode 01 for line 3 with code 0091, so the whole invoice is not posted. The fix is to clear the extra tax field on line 3 and post again. The other 4 lines need no change.
The best way to stop these errors is to check each invoice against the same rules before FBR sees it. Digi Invoice checks the sale type, tax fields, HS code, unit, identifiers and debit-note references first. Then it posts the invoice to FBR through PRAL and prints the IRN (Invoice Reference Number — the unique number FBR gives each accepted invoice) and the FBR QR code. It costs Rs 1,000 a month with unlimited invoices.
Test your fixes in the sandbox first. 'FBR Digital Invoicing Sandbox Testing Scenarios (SN001–SN028) Explained' lists every test case, and 'FBR Digital Invoicing Sandbox vs Production (2026)' explains how the two systems differ. If a rejected invoice is never fixed, see 'FBR Digital Invoicing Penalty 2026: Every Fine in One List'. Need help with an error? Contact Digi Invoice — WhatsApp 0300 8680363.
Identity, format and date errors
0002 and 0108 — buyer or seller registration number is not in the proper format: an NTN must be 7 digits and a CNIC 13 digits, with no dashes or special characters. 0010 — buyer name is missing. 0012 and 0053 — buyer registration type must be exactly Registered or Unregistered and must match the buyer's actual FBR profile (verify through the Get_Reg_Type reference API). 0082 fires when the seller's registration number does not belong to a sales-tax-registered person at all.
Dates have three codes of their own: 0042 (date missing), 0043 (date in the future) and 0005/0113 (wrong format — the API accepts YYYY-MM-DD only). 0058 rejects self-invoicing: the buyer and seller NTN/CNIC cannot be the same. 0088 and 0173 govern the invoice number format — alphanumeric with hyphens between segments, such as Inv-001, never a leading or trailing hyphen.
Sale type, HS code and unit-of-measure errors
0003 and 0109 — the invoice type must be Sale Invoice or Debit Note exactly as the doctypecode reference API spells it. 0007, 0013 and 0092 — the sale type is missing or not valid for the seller's registered business activity and sector; 0093 specifically blocks manufacturers from posting Non-Adjustable Supplies. 0019, 0044 and 0052 cover the HS code: missing, invalid, or not permitted for the chosen sale type (steel HS codes only work with steel sale types, for example).
Units of measure carry their own family: 0099 means the UoM does not match the HS code (look up the allowed list via the HS_UOM reference API), 0062 requires MT for steel melting and re-rolling, 0097 requires KG for Potassium Chlorate, 0096 allows only KWH for electricity HS codes, and 0060/0061 pin services rates like 50/SqY or 200/bill to their specific units. 0020 and 0046 fire when the rate is empty or does not exist for the selected sale type on the invoice date — rates must come from the SaleTypeToRate reference API, not typed by hand.
Debit note errors (0026–0067)
Debit notes validate against the original invoice. 0026 — the invoice reference number is required: 22 digits when the original was NTN-based, 28 when CNIC-based. 0057 — that reference does not exist in FBR's system. 0027 and 0028 — a reason is mandatory, and remarks become mandatory when the reason is Others. 0029 and 0035 — the note date cannot be earlier than the original invoice date, and 0034 caps the window at 180 days from the original.
The value caps close the family: 0036 and 0067 reject a note whose quantity, sale value or sales tax exceeds the referenced invoice, and 0064 blocks a debit note against an invoice that already has a credit note attached. The practical fix for all of these is the same — pull the original invoice's figures and dates first, then build the note within those limits.
SRO, schedule and tax-calculation errors
Any rate other than the standard 18% needs its legal reference: 0077 demands a valid SRO or schedule number and 0078 demands the item serial within it — the two always travel together. 0090 requires the fixed/notified retail price for 3rd Schedule goods, and 0091 is the best-known code in the family: extra tax must be empty (not zero, not a number) for reduced-rate, zero-rated, exempt and non-adjustable supplies. 0079 blocks the 5% rate where the per-unit value exceeds Rs 20,000, and 0098 rejects goods lines with no quantity.
The calculated-tax quartet compares your salesTaxApplicable against FBR's own arithmetic: 0104 for value × percentage, 0102 for 3rd Schedule retail-price × rate, 0105 for quantity × fixed per-unit rupees, and 0103 for the Potassium Chlorate composite of 18% plus Rs 60 per KG. 0008 and 0050 require sales tax withheld at source to be either 0 or exactly equal to the sales tax. 0300 rejects negative, empty or non-numeric values in any numeric field, and 0302 rejects more than 2 decimal places on money or 4 on quantity.
Token and authorisation errors (0401, 0402)
0401 and 0402 mean the seller's or buyer's NTN/CNIC has no valid authorised access token — the bearer token is missing, expired, revoked, or belongs to the wrong environment. PRAL tokens are issued per environment (sandbox and production are separate) and are valid for five years; the token itself decides which environment the invoice lands in, regardless of the URL used.
Software that validates against these rules before posting turns most of this list into a non-event. Digi Invoice checks registration formats, sale-type and HS-code compatibility, SRO pairing, extra-tax handling and every tax formula locally, then shows a clear, decoded explanation for anything FBR still rejects — including the exact code, cause and fix.
Difficult words in this guide
statusCode — the two-digit answer FBR gives each invoice and each line: 00 means valid, 01 means invalid.
Sale type — the kind of supply on an invoice line, such as standard rate, reduced rate, zero-rated or exempt.
HS code — the customs code that says what the goods are; FBR checks it against the sale type and the unit.
UoM (unit of measure) — the unit on a line, such as KG, MT or KWH; it must match the HS code.
Debit note — a document that changes an invoice already posted; it must quote the original invoice number.
SRO (Statutory Regulatory Order) — an FBR order that sets a special tax rate; codes 0077 and 0078 ask for its number and serial.