Reference · 112 codes
FBR digital invoicing error codes
When FBR rejects an invoice it returns a four-digit code and a terse message that often names the wrong field. This is every code the digital invoicing API can return, what actually triggers it, and what to change.
Buyer and seller identity
- 0001
Seller is not registered for sales tax
FBR does not recognise the seller NTN or CNIC on the invoice as an active sales tax registration.
Fix: Check the seller registration on your own IRIS profile. A 7-digit NTN belongs to a company or AOP; an individual uses their 13-digit CNIC with no dashes.
sellerNTNCNIC
- 0002
Buyer registration number is malformed
The buyer identifier is not in a shape FBR accepts. It is a formatting rejection, not a lookup failure.
Fix: Send 13 digits for a CNIC or 7 digits for an NTN, with no dashes or spaces.
buyerNTNCNIC
- 0009
Buyer registration number is missing
The buyer registration field arrived empty on a sale that requires it.
Fix: Populate the buyer NTN or CNIC. It is only optional where the buyer is unregistered.
buyerNTNCNIC
- 0010
Buyer name is missing
No buyer business name was supplied.
Fix: Send the buyer's registered business name, not a short code or nickname.
buyerBusinessName
- 0012
Buyer registration type is missing
The field that says whether the buyer is registered for sales tax arrived empty.
Fix: Send either Registered or Unregistered. Confirm it with the Get_Reg_Type lookup rather than assuming.
buyerRegistrationType
- 0053
Buyer registration type is invalid
A value was supplied but it is not one FBR accepts.
Fix: The only accepted values are Registered and Unregistered, spelled exactly that way.
buyerRegistrationType
- 0082
Seller is not registered for sales tax
The same condition as 0001, returned from a different validation stage.
Fix: Verify the seller registration is active on the Active Taxpayer List for sales tax.
sellerNTNCNIC
- 0083
Seller registration number does not match
The seller NTN on the invoice is not the one the API token was issued to.
Fix: The token and the seller NTN must belong to the same taxpayer. This usually means the wrong token is configured.
sellerNTNCNIC
- 0106
Buyer is not registered for sales tax
The invoice declares the buyer as registered, but FBR has no active sales tax registration for that number.
Fix: Either correct the buyer number, or change buyerRegistrationType to Unregistered if that is the truth.
buyerNTNCNICbuyerRegistrationType
- 0107
Buyer registration number does not match
The buyer number does not correspond to the buyer named on the invoice.
Fix: Re-verify the buyer's NTN. A mismatch usually means a stale entry in your customer records.
buyerNTNCNICbuyerBusinessName
- 0108
Seller registration number is invalid
The seller identifier is malformed rather than merely unrecognised.
Fix: Send 7 digits for an NTN or 13 for a CNIC, with no separators.
sellerNTNCNIC
- 0156
NTN or registration number is invalid
The identifier on a purchase submission is null or malformed.
Fix: Send 7 digits for an NTN or 13 for a CNIC, with no separators.
Purchase side
- 0157
Buyer is not registered for sales tax
The purchase-side counterparty has no active sales tax registration.
Fix: Verify with Get_Reg_Type before submitting.
buyerNTNCNIC
Purchase side
- 0158
Buyer registration number does not match
The number does not correspond to the named counterparty.
Fix: Re-verify the registration number against the Active Taxpayer List.
buyerNTNCNICbuyerBusinessName
Purchase side
- 0159
FTN holder cannot be the seller on a purchase
Federal Tax Number holders are not permitted as the supplier on a purchase entry.
Fix: Check the direction of the transaction — this often means a sale was submitted as a purchase.
Purchase side
- 0160
Buyer name is missing
No counterparty name was supplied on the purchase.
Fix: Send the registered business name.
buyerBusinessName
Purchase side
- 0205
Scenario not valid for an unregistered buyer
The scenario is one for sales between registered persons, and the buyer given is not on the Active Taxpayer List. The message blames the scenario, but the buyer is usually what is wrong.
Fix: Verify the buyer's NTN before sending. If they are genuinely unregistered, use the unregistered-buyer scenario instead.
scenarioIdbuyerNTNCNICbuyerRegistrationType
Invoice type, number and date
- 0003
Invoice type is not valid
The invoice type is empty or is not a value FBR recognises.
Fix: Use Sale Invoice or Debit Note, taken from the doctypecode reference endpoint.
invoiceType
- 0005
Invoice date format is wrong
The date did not parse. FBR's message quotes an example in the wrong format, which misleads people.
Fix: Send YYYY-MM-DD, for example 2026-08-23. Not DD-MMM-YYYY, despite what the error text suggests.
invoiceDate
- 0011
Invoice type is missing
No invoice type was supplied at all.
Fix: Every invoice needs an explicit type; there is no default.
invoiceType
- 0041
Invoice number is missing
Your own invoice number was not supplied.
Fix: Send your internal invoice number. FBR's own reference number comes back in the response and is a different thing.
- 0042
Invoice date is missing
The invoice date field arrived empty.
Fix: Send the date of issuance in YYYY-MM-DD.
invoiceDate
- 0043
Invoice date is not valid
The date parsed but is not an acceptable value — a future date or an impossible day.
Fix: Use the real date of supply. Invoices cannot be dated forward.
invoiceDate
- 0088
Invoice number contains disallowed characters
Only letters, digits and hyphens are accepted, and a hyphen must sit between alphanumeric characters rather than at either end.
Fix: Strip slashes, spaces and other punctuation. INV-001 is fine; INV/001 and -001 are not.
- 0109
Wrong invoice type for this transaction
The type supplied does not suit the transaction — commonly a debit note sent as a sale invoice.
Fix: Match the type to what the document actually is, and remember a debit note also needs invoiceRefNo.
invoiceTypeinvoiceRefNo
- 0113
Date could not be parsed
A date field anywhere in the payload is unreadable.
Fix: Send YYYY-MM-DD throughout. Mixed formats in different fields are a common cause.
invoiceDate
- 0161
Purchase date is before the original sale invoice
The purchase cannot predate the sale it corresponds to.
Fix: Align the date with the original sale invoice.
invoiceDate
Purchase side
- 0173
Invoice number contains disallowed characters
Letters, digits and internal hyphens only, as on the sales side.
Fix: Remove slashes, spaces and leading or trailing hyphens.
Purchase side
- 0201
Scenario ID is required
Sandbox submissions must name the test scenario they represent. Production submissions must not, so this only ever appears against the sandbox.
Fix: Send scenarioId, in the form SN001. Which ones apply to you comes from your business activity and sector.
scenarioId
Sale and purchase type
- 0007
Sale type does not suit this registration
The sale type is valid in itself but is not one your registration is permitted to use.
Fix: Check which sale types your sales tax profile allows. Sector-specific types are restricted to that sector.
saleType
- 0013
Sale type is missing
The sale type field is empty or null.
Fix: Every line item needs a sale type. Send the string exactly as FBR publishes it, including its irregular spacing.
saleType
- 0092
Sale type is not valid
The value supplied is not in FBR's list of sale types.
Fix: Take the exact string from the transtypecode reference endpoint. Do not correct its spelling or spacing.
saleType
- 0093
Sale type is not allowed for a manufacturer
The sale type chosen is not available to a taxpayer registered as a manufacturer.
Fix: Pick a sale type permitted for your business activity — the same activity that determines your sandbox scenarios.
saleType
- 0101
Steel sector must use toll manufacturing
A steel-sector transaction was sent under a general sale type where the toll manufacturing type is required.
Fix: Use the Toll Manufacturing sale type, which is scenario SN011.
saleType
- 0111
Wrong purchase type selected
The purchase type does not suit the transaction being reported.
Fix: Purchase-side transactions such as cotton ginners use their own type, not the sale equivalent.
saleType
- 0162
Purchase type is missing or invalid
No valid purchase type was supplied.
Fix: Take the exact string from the reference endpoint.
saleType
Purchase side
- 0163
Purchase type not allowed for a manufacturer
The type chosen is unavailable to a manufacturer registration.
Fix: Select a purchase type permitted for your business activity.
saleType
Purchase side
- 0204
Sale type does not match the scenario
The scenario chosen expects a particular sale type, and the line item declared a different one. FBR checks the pair, not each on its own.
Fix: Match the sale type to the scenario. Each scenario page on this site names the sale type it requires.
scenarioIdsaleType
HS code, rate and unit
- 0019
HS code is missing
A line item was sent with no HS code.
Fix: Every line needs an HS code in dotted form, for example 5208.1100.
hsCode
- 0020
Rate is missing
No tax rate was supplied on the line item.
Fix: Send the rate description exactly as SaleTypeToRate returns it, such as 18%. Rates are date-dependent, so query for the invoice date.
rate
- 0021
Value excluding sales tax, or quantity, is missing
Either the pre-tax line value or the quantity was not supplied.
Fix: Both are required on every line. Check the one you are not thinking about.
valueSalesExcludingSTquantity
- 0044
HS code is missing
The same condition as 0019, raised at a different validation stage.
Fix: Populate hsCode on every line item.
hsCode
- 0046
Rate is missing for the selected sale type
A rate is required for this sale type and none was given.
Fix: Look the rate up with SaleTypeToRate for the transaction type and province, then send the returned description verbatim.
ratesaleType
- 0052
HS code does not match the sale type
The HS code is real, but it is not valid for the sale type declared on the same line. One of the most frequently hit errors.
Fix: Change whichever is wrong. Zero-rated or reduced-rate sale types only accept HS codes covered by the relevant schedule.
hsCodesaleType
- 0096
Unit must be KWH
This HS code is an electricity supply code and accepts kilowatt-hours only.
Fix: Send the unit as KWH and the quantity as units of electricity.
uoMquantity
- 0097
Unit must be KG
This HS code accepts kilograms only.
Fix: Convert your working unit to KG before submitting. Pounds, maunds and bales all have to be converted.
uoMquantity
- 0098
Quantity or electricity units missing
The quantity field arrived empty.
Fix: Send a numeric quantity. Zero is not a substitute for omitting it.
quantity
- 0099
Unit of measurement is invalid for the HS code
Each HS code permits only certain units, and the one supplied is not among them.
Fix: Query HS_UOM for the HS code and use a unit it returns. This is the error the app's unit conversion exists to prevent.
uoMhsCode
- 0164
Unit must be KWH
The HS code is an electricity code and accepts kilowatt-hours only.
Fix: Send KWH as the unit.
uoM
Purchase side
- 0165
Unit must be KG
This HS code accepts kilograms only.
Fix: Convert to KG before submitting.
uoMquantity
Purchase side
- 0166
Quantity or electricity units missing
The quantity field is empty.
Fix: Send a numeric quantity.
quantity
Purchase side
- 0300
Decimal value is not valid
A numeric field contains something that will not parse as a decimal.
Fix: Send plain numbers. No thousands separators, no currency symbols, and a dot for the decimal point.
Tax amounts and calculation
- 0018
Sales tax or FED in ST mode is missing
The field carrying sales tax, or federal excise charged in sales tax mode, arrived empty.
Fix: Send the amount even when it is zero. Exempt and zero-rated lines still need the field present.
salesTaxApplicable
- 0023
Sales tax is missing
No sales tax amount was supplied on the line.
Fix: Populate salesTaxApplicable, excluding further tax and extra tax, which have their own fields.
salesTaxApplicable
- 0031
Sales tax not mentioned
The same omission as 0023, raised from a different check.
Fix: Send salesTaxApplicable on every line item.
salesTaxApplicable
- 0079
Rate not allowed above a value threshold
A concessionary rate is capped by transaction value. FBR's published example is that 5% is unavailable once the value excluding sales tax exceeds 20,000.
Fix: Apply the standard rate above the threshold, or split the supply if that genuinely reflects the transaction.
ratevalueSalesExcludingST
- 0080
Further tax is missing
Further tax typically applies on supplies to unregistered buyers and the field was left empty.
Fix: Send the amount, or zero where it does not apply. Omitting the field is not the same as zero.
furtherTax
- 0081
Input credit not allowed flag is missing
The field marking supplies where input credit cannot be claimed was left empty.
Fix: Set the flag explicitly. Non-adjustable supplies such as SN025 depend on it.
- 0085
Total value of sales missing (PFAD only)
Palm fatty acid distillate requires the total sales value to be stated.
Fix: Populate totalValues for PFAD transactions.
totalValues
- 0087
Petroleum levy rates not configured
Levy rates are missing from the seller's configuration on FBR's side.
Fix: This one is not fixed in the payload. Contact FBR support to have the levy rates set up against your registration.
- 0089
FED charged is missing
A federal excise amount is required for this sale type and none was supplied.
Fix: Populate fedPayable. It is separate from salesTaxApplicable even when excise is collected in sales tax mode.
fedPayable
- 0090
Fixed or notified value, or retail price, is missing
Third Schedule goods are taxed on printed retail price, and that price was not supplied.
Fix: Populate fixedNotifiedValueOrRetailPrice with the printed retail price, not your selling price.
fixedNotifiedValueOrRetailPrice
- 0091
Extra tax must be empty
The opposite of 0095 — extra tax was supplied where it is not permitted.
Fix: Leave extraTax empty for this sale type rather than sending zero.
extraTax
- 0095
Extra tax is missing
The extra tax field was expected and arrived empty.
Fix: Send the amount or zero.
extraTax
- 0102
Third Schedule tax calculation does not match
FBR recalculated the tax on the retail price and got a different figure from yours.
Fix: Recompute on the retail price rather than the transaction value; that is almost always the discrepancy.
fixedNotifiedValueOrRetailPricesalesTaxApplicable
- 0103
Potassium chlorate tax does not match
This commodity has a rate combining a percentage with a fixed amount per kilogram, and the total does not reconcile.
Fix: Apply both components. Take the rate description from SaleTypeToRate rather than assuming a flat percentage.
salesTaxApplicableratequantity
- 0104
Percentage sales tax does not match
The tax amount is not what the declared rate produces against the declared value.
Fix: Check rounding. Compute tax on valueSalesExcludingST and round once, at the end.
salesTaxApplicableratevalueSalesExcludingST
- 0105
Quantity-based sales tax is incorrect
Where tax is charged per unit rather than by value, the amount does not match the quantity.
Fix: Multiply by the quantity in the unit FBR expects. A unit conversion error will show up here.
salesTaxApplicablequantityuoM
- 0167
Value excluding sales tax is missing
The pre-tax value was not supplied or is not numeric.
Fix: Send a plain decimal value.
valueSalesExcludingST
Purchase side
- 0170
Rate not allowed above a value threshold
The purchase-side equivalent of 0079. FBR's example is that 5% is unavailable above 20,000 excluding sales tax.
Fix: Apply the standard rate above the threshold.
ratevalueSalesExcludingST
Purchase side
- 0174
Sales tax is missing
No sales tax amount was supplied on the purchase line.
Fix: Populate the sales tax field, using zero where none applies.
salesTaxApplicable
Purchase side
- 0175
Fixed or notified value, or retail price, is missing
Third Schedule purchases require the notified retail price.
Fix: Populate fixedNotifiedValueOrRetailPrice.
fixedNotifiedValueOrRetailPrice
Purchase side
- 0177
Further tax is missing
The further tax field arrived empty on a purchase.
Fix: Send the amount or zero.
furtherTax
Purchase side
Withholding at source
- 0006
No sale invoice exists for this withholding entry
A withholding submission references a sale invoice FBR cannot find.
Fix: Submit the sale invoice first, then the withholding entry against it.
- 0008
Withheld amount must be zero or equal to the tax
Sales tax withheld at source has to be either nothing or the whole tax amount. Partial values are rejected.
Fix: Send zero, or the full salesTaxApplicable figure. Nothing in between.
salesTaxWithheldAtSourcesalesTaxApplicable
- 0022
Withheld at source is missing
The withholding field arrived empty.
Fix: Send zero where nothing was withheld rather than omitting the field.
salesTaxWithheldAtSource
- 0024
Sales tax withheld is missing
The same omission as 0022 from a different check.
Fix: Populate salesTaxWithheldAtSource, using zero when not applicable.
salesTaxWithheldAtSource
- 0032
Withholding entries are limited to government and FTN holders
A withholding-only submission was attempted by a taxpayer who is not a government body or FTN holder.
Fix: Only government departments and FTN holders can file this without a corresponding sale invoice.
- 0039
Withholding fields must match the sale invoice
For a registered counterparty, the withholding entry has to mirror the original sale invoice exactly.
Fix: Copy the figures from the original invoice rather than recalculating them.
- 0050
Cotton ginners withholding must equal the tax or zero
For the cotton ginners sale type specifically, withheld tax must be either zero or exactly the sales tax.
Fix: Set it to zero or to the full tax amount. This is the usual blocker on scenario SN009.
salesTaxWithheldAtSourcesaleType
- 0055
Withheld amount as withholding agent is missing or malformed
The value is empty or not in an acceptable numeric format.
Fix: Send a plain decimal. This is the withholding-agent figure, distinct from the ordinary withheld amount.
salesTaxWithheldAtSource
- 0070
Withholding cannot be created for unregistered buyers
Withholding applies only where the counterparty is registered for sales tax.
Fix: Verify the buyer's registration first. If they are genuinely unregistered, no withholding entry belongs on this invoice.
buyerRegistrationType
- 0169
Withholding limited to government and FTN holders
A withholding-only purchase entry was attempted by a taxpayer who is neither.
Fix: Only government bodies and FTN holders may file this without a purchase invoice.
Purchase side
- 0176
Withheld at source is missing
The withholding field is empty on a purchase entry.
Fix: Send zero where nothing was withheld.
salesTaxWithheldAtSource
Purchase side
Debit and credit notes
- 0026
Invoice reference number is required
Debit and credit notes must point at the invoice they amend.
Fix: Send invoiceRefNo — FBR's 22-digit number for an NTN, or 28 digits for a CNIC.
invoiceRefNo
- 0027
Reason is required
A note has to state why it is being issued.
Fix: Supply a reason from FBR's list.
- 0028
Reason remarks are required
The reason was given as Others, which obliges you to explain in free text.
Fix: Add remarks, or pick a specific reason instead of Others.
- 0029
Note date is before the original invoice
A debit or credit note cannot predate the invoice it amends.
Fix: Set the note date to the original invoice date or later.
invoiceDateinvoiceRefNo
- 0034
Note is outside the permitted window
Debit and credit notes can only be raised within a fixed period after the original invoice — FBR's published figure is 180 days.
Fix: Beyond that window the note cannot be filed electronically. Take it up with your tax adviser.
invoiceRefNoinvoiceDate
- 0035
Note date must be on or after the original invoice date
The same constraint as 0029 from a different check.
Fix: Correct the note date.
invoiceDate
- 0036
Credit note value exceeds the original invoice
You cannot credit back more than was invoiced.
Fix: Cap the note at the original value of sales, or check whether an earlier note already consumed part of it.
valueSalesExcludingSTinvoiceRefNo
- 0037
Credit note withheld amount exceeds the original
The withheld figure on the note is larger than the invoice being credited.
Fix: Reduce it to at most the original withheld amount.
salesTaxWithheldAtSourceinvoiceRefNo
- 0057
Referenced invoice does not exist
The invoice reference number does not resolve to anything FBR holds.
Fix: Use the exact reference FBR returned when the original invoice was accepted, not your own invoice number.
invoiceRefNo
- 0058
Self-invoicing is not allowed
The buyer and seller registration numbers are the same.
Fix: A taxpayer cannot invoice themselves. Check for a copy-paste error between the two fields.
sellerNTNCNICbuyerNTNCNIC
- 0064
A credit note already exists for this invoice
The invoice has already been credited.
Fix: Check your records before issuing another. A second note needs a different basis.
invoiceRefNo
- 0067
Debit note tax exceeds the original invoice
A debit note reports more sales tax than the invoice it amends.
Fix: Check the rate and value on the note against the original.
salesTaxApplicableinvoiceRefNo
- 0068
Credit note tax is below what the rate implies
The tax on the credit note does not reconcile with the rate applied.
Fix: Recompute the tax at the original rate.
salesTaxApplicablerateinvoiceRefNo
- 0071
Note not permitted against this invoice
Credit notes are restricted to particular taxpayer categories for this invoice.
Fix: Confirm your registration is entitled to credit this transaction.
invoiceRefNo
- 0510
Server exception at FBR
An unhandled exception on FBR's side, returned with their own spelling, 'Execption occured'. It is not caused by anything in the payload. Every well-formed debit note we submitted to the sandbox on 2026-08-23 returned it, including ones whose reason and remarks had already passed validation.
Fix: Nothing in the request will fix this. Keep the invoice, retry later, and report it to FBR if it persists.
SRO and schedule references
- 0077
SRO or schedule number is missing
Reduced, exempt and zero-rated treatments derive from a notification, and it was not cited.
Fix: Populate sroScheduleNo from the SroSchedule reference endpoint for the rate and date.
sroScheduleNo
- 0078
SRO item serial number is missing
The notification was cited but not the specific serial number within it.
Fix: Populate sroItemSerialNo using the SROItem endpoint for that SRO and date.
sroItemSerialNosroScheduleNo
Sector-specific rules
- 0030
Unregistered distributor type not allowed before the cut-off
This distributor treatment only became available from a system cut-off date.
Fix: Check the invoice date against the cut-off, or use a different buyer treatment.
invoiceDatebuyerRegistrationType
- 0056
Buyer does not exist in the steel sector
A steel sale type was used against a buyer not registered in that sector.
Fix: Confirm the buyer's sector registration, or use a general sale type if the buyer is outside steel.
buyerNTNCNICsaleType
- 0073
Sale origination province is missing
The province the supply originates from was not stated.
Fix: Send the seller province using a value from the provinces reference endpoint.
sellerProvince
- 0074
Destination of supply is missing
The province the supply is destined for was not stated.
Fix: Send the buyer province from the provinces reference endpoint.
buyerProvince
- 0086
Not an EFS licence holder for compressor scrap
This transaction is limited to Export Facilitation Scheme licence holders who have imported compressor scrap in the last twelve months.
Fix: Not fixable in the payload — it depends on your EFS licence status and import history.
- 0100
Cotton ginners sales require a registered buyer
The cotton ginners sale type is only permitted against registered counterparties.
Fix: Verify the buyer is registered before using this sale type. Relevant to scenario SN009.
buyerRegistrationTypesaleType
- 0168
Cotton ginners purchases require a registered counterparty
The cotton ginners purchase type is only available against registered taxpayers. This is the purchase side of scenario SN009.
Fix: Verify the ginner's registration before submitting.
buyerRegistrationTypesaleType
Purchase side
- 0171
Not an EFS licence holder for compressor scrap
Restricted to EFS licence holders who imported compressor scrap in the last twelve months.
Fix: Depends on your licence status, not on the payload.
Purchase side
- 0172
Petroleum levy rates not configured
Levy rates are not set up against the registration on FBR's side.
Fix: Contact FBR support; this cannot be corrected in the request.
Purchase side
Tokens and access
- 0401
Seller has no valid access token
The seller NTN on the invoice has no authorised token. Added by PRAL on 24 July 2025.
Fix: Confirm the token belongs to this seller and has not expired. Tokens run for five years and are issued separately for sandbox and production.
sellerNTNCNIC
- 0402
Buyer has no valid access token
The buyer NTN has no authorised token, which matters where the buyer must also be integrated. Added 24 July 2025.
Fix: This is the buyer's own integration status, not something you can correct on your side.
buyerNTNCNIC
Where this comes from
The codes and the conditions that raise them are taken from PRAL's Technical Specification for the DI API, version 1.12. The explanations here are our own — the official document gives you a sentence like "Provide proper HS Code" without telling you that the HS code is probably fine and the sale type is what disagrees with it.
FBR's numbering is not contiguous. Where a code is missing from this page, FBR does not publish it.
Most of these should never reach you
The free app we are building validates an invoice against these rules before it is submitted — the right unit for the HS code, the rate that applies on that date, the SRO the treatment depends on. The aim is that you read a plain-language problem, not a four-digit code.