When FBR does not accept a digital invoice, it replies with an error code and a short message. The codes look cryptic, but almost all of them come down to a handful of data problems: buyer registration, HS codes, sale types, rates and dates. This guide lists the most common FBR Digital Invoicing error codes from FBR’s technical documentation (v1.12) and how to fix each one.
First: is it a connection problem or a data problem?
| Reply | Meaning | Fix |
|---|---|---|
| HTTP 401 Unauthorized | The security token is missing, wrong or for the other environment | Copy the token again from IRIS; check Sandbox vs Production |
| Timeout / connection refused | Your server IP is not whitelisted by PRAL | Check IP Whitelisting in IRIS |
| HTTP 500 | Server error on FBR’s side | Wait and retry later |
| HTTP 200 with an error code | The connection works; a field failed validation | Use the table below |
Common FBR invoice error codes and fixes
| Code | FBR message (short) | Usual cause | How to fix |
|---|---|---|---|
| 0001 | Seller not registered for sales tax | Seller NTN/registration in the invoice does not match an active sales tax registration | Enter your NTN exactly as in IRIS; make sure the token belongs to the same business |
| 0002 | Invalid buyer registration no. or NTN | Buyer marked Registered but the NTN/CNIC is wrong or not registered | Check the buyer’s 7-digit NTN or 13-digit CNIC; if not registered, mark the buyer Unregistered |
| 0003 / 0011 | Provide (proper) invoice type | Invoice type missing or not “Sale Invoice” / “Debit Note” | Use only FBR’s two document types |
| 0005 | Date not in valid format | Wrong date format or an impossible date | Use the format FBR expects; check the invoice date |
| 0009 / 0010 / 0012 | Provide buyer registration no. / name / type | Buyer details incomplete | Complete the customer record before invoicing |
| 0013 | Provide valid sale type | Sale type text does not match FBR’s list, or is not allowed for your scenarios | Pick the sale type from FBR’s list; see sale types and scenarios |
| 0018 | Provide Sales Tax/FED in ST mode | FED-in-ST-mode sale without the tax amount | Fill the sales tax / FED field for that line |
| 0019 / 0044 | Provide HS code | HS code missing on a line | Add the HS code to the product (format 0000.0000) |
| 0052 | Provide valid HS code | HS code does not exist or does not fit the sale type | Check the code against FBR’s HS code list |
| 0020 / 0046 | Provide rate | Rate missing or in the wrong form | Set the product’s tax rate; use the rate valid on the invoice date |
| 0023 | Provide sales tax | Tax amount missing | Let the software calculate tax from value and rate |
| 0041 / 0042 | Provide invoice no. / date | Required header fields empty | Use automatic invoice numbering |
| 0053 | Buyer registration type is invalid | Value other than Registered / Unregistered | Set the buyer type correctly |
| 0057 | Reference invoice does not exist | A debit note or return points to a wrong FBR invoice number | Make the return or debit note from the original reported invoice |
| 0058 | Self-invoicing not allowed | Buyer NTN is the same as the seller’s | Choose the correct customer |
The full list of sales error codes is in section 7 of FBR’s Technical Documentation for Digital Invoicing API (v1.12).
Five habits that prevent most rejections
- Clean your product master once. HS code, unit, rate and sale type on every product.
- Verify buyers. Check the NTN/CNIC of registered buyers before the first invoice.
- Use FBR’s validate call before posting. FBR offers a validate endpoint that checks an invoice without reporting it.
- Never edit a reported invoice. Corrections go through a debit note or a sales return against the original.
- Watch the queue daily. Fix failures the same day so your monthly reports are complete.
How 3Ace FBR Suite helps
3Ace FBR Suite is built to stop errors before FBR sees them:
- An FBR readiness panel checks NTN/CNIC format, HS code format, sale type, buyer type and amounts while you type.
- Check with FBR calls FBR’s validate service without reporting the invoice.
- Rejected invoices land in the FBR sync queue with FBR’s exact code and message, the number of attempts, and the payload sent. Fix and press Sync, or Sync all.
- Returns and debit notes are made only from the original reported invoice, so the reference number is always right.
- The FBR failures report lists every rejection for any period.
Frequently asked questions
Is a rejected invoice a valid tax invoice?
No. Only an invoice with an FBR invoice number is reported. Fix and re-send it.
Can I change an invoice after FBR accepts it?
FBR allows corrections of genuine mistakes within a limited window; after that you need a debit note or sales return. See the complete FBR Digital Invoicing guide.
Why does the sandbox accept an invoice that production rejects?
Production checks live registration data, such as whether the buyer is actually registered. Keep customer data accurate.
Start a free 14-day trial and see the readiness checks for yourself.
Error codes and messages summarised from FBR’s Technical Documentation for Digital Invoicing API, v1.12. FBR may add or change codes.