Designing your own FBR sandbox test cases
FBR gives you test scenarios to clear in its test system (the sandbox). Passing them proves that your connection works. It does not prove that your invoices are right. The test cases you build from your own sales are what make your first live week quiet.

Answer first. Clear the scenarios FBR assigns, then test your own business. Take last month’s sales and pick real invoices that cover every product type, sale type, buyer type and branch you use. Add invoices that should fail, and check that your team can see why they failed. Then test two things FBR’s scenarios never touch: an invoice whose reply never arrives, and a busy day’s volume. FBR issues the production token automatically once your assigned scenarios pass, so nobody else will ask you to do any of this. Your own test set is the only check between testing and live customers.
What FBR’s scenarios prove
FBR publishes test scenarios numbered SN001 to SN028. No business gets all 28. Your set depends on the business nature and sector you chose when you enrolled. It ranges from two scenarios for a service provider to fifteen at most. You clear each scenario by sending an invoice with the sale type it expects.
Passing them shows that your system can reach FBR and that your token works. It also shows that you can send each assigned sale type in the right shape. It does not show that your product list has the right HS codes, or that your buyers’ numbers are valid. It does not show that your staff can handle a rejection, or that your system copes when FBR is too slow to answer. Your own test cases fill those gaps.
One detail to remember: FBR’s test system requires a scenario code on every invoice, and the live system rejects it. Your own test cases need the code too, because they go to the same test system.
Start from last month’s sales
The best test set comes from invoices you actually issued. Pull last month’s sales and choose:
- your twenty best-selling items, so your most common HS codes, units and rates are proven
- at least one invoice for every sale type you use, including those FBR did not assign
- a registered buyer, an unregistered buyer and a buyer identified by CNIC
- your largest invoice by value and your longest by number of lines
- one invoice from each branch, and one for each province you ship to
- anything unusual: a reduced-rate item under an SRO, a Third Schedule item sold at retail price, an exempt item
- a debit note against an earlier invoice, if you ever issue one
Finance should choose the invoices and say what the right tax treatment is. IT should send them. Settle the tax treatment of anything unusual now, before your system repeats the same choice on every live invoice.
Cases that should pass
For each case, write down what you send and what a correct result looks like. An invoice that FBR accepts with the wrong tax is not a pass.
| Case | What to send | Correct result |
|---|---|---|
| Standard-rate goods | A common item to a registered buyer | FBR number comes back; tax matches your books |
| Unregistered buyer | The same item to a buyer with no NTN | Accepted with the right tax, including further tax where it applies |
| Reduced rate | An item taxed under an SRO | Accepted with the SRO number and the item’s serial in that SRO |
| Retail price item | A Third Schedule item | Accepted, with tax worked out on the printed retail price |
| Mixed invoice | Standard, reduced and exempt lines together | Every line comes back clean, not only the invoice as a whole |
| Long invoice | Your longest real invoice | All lines accepted; totals match |
| Other branch or province | An invoice from each place you sell from | Province sent as a province, not a city; rate correct |
| Debit note | A note against a test invoice | Accepted, carrying the original FBR invoice number and a reason |
| Validate only | Any invoice sent to FBR’s check-only (validate) method | Same checks, no FBR number, nothing filed |
Cases that should fail
Failures teach your team the most, and they cost little while you are still testing. Send each one on purpose and check two things. FBR rejects it, and the person who will fix it can see the reason without calling a developer.
| Send this | FBR’s message | The lesson |
|---|---|---|
| A buyer’s STRN pasted into the NTN field | Invalid Buyer Registration No or NTN | Clean up buyer numbers before they reach invoices |
| A goods HS code with a services sale type | HS Code that does not match with provided sale type | Take both from FBR’s lists, not from memory |
| A unit your product list uses but FBR does not allow for that code | Unit of measurement not allowed for this HS code | Take units from FBR’s list, with capital and small letters exactly as shown |
| The city “Karachi” as the province | Provide Sale Origination Province of Supplier | Send provinces, not cities |
| Date as 01/10/2026 | Provide invoice date in YYYY-MM-DD format | Change the date format before sending |
| Invoice number INV/2026/001 | Alphanumeric and (-) contained invoice No | Use letters, digits and hyphens only |
| A zero in a tax field that does not apply | Extra tax must be empty | If a tax does not apply, leave it blank, not 0 |
| A reduced rate with no SRO serial | Provide Item Sr No | Save the SRO and serial with each product |
| A note pointing to your own invoice number | Reference Invoice does not exist | Save FBR’s number against every invoice |
| A branch transfer with the same seller and buyer | Self-invoicing not allowed | Keep internal stock moves out of what you send. Under STGO 25 of 2026, goods moved to your own warehouse under the same STRN travel with a stock transfer note, not an e-invoice |
FBR adds and renumbers its error codes, so judge each case by the message text. Our error code guide explains what each message means.
The lost reply test
Teams skip this test more than any other, and it causes the most expensive live problem. Sometimes FBR records an invoice but its reply never reaches you, because the connection timed out or dropped. FBR does not reject a second copy of an invoice it already has. If your system simply sends it again, you now have two live invoices. Cancelling one uses part of a monthly allowance shared by every edit and cancellation.
So while you test, cut the connection on purpose while an invoice is being sent. Then watch what your system does. The right result: it marks the invoice as unknown, and checks whether FBR has it before trying again. If your system resends without checking, fix that before going live. eInvoicePro’s API accepts a unique key for each invoice. If you resend after a timeout on your side, eInvoicePro sees it as the same invoice. It also keeps the invoice in a status your team can see.
The busy day test
Ten test invoices going through does not prove your system can handle your busiest day. Send a realistic peak through FBR’s test system: a month-end run for a distributor, an evening rush for a retailer, a file of several hundred invoices for a bulk user.
Watch three things. How long the whole run takes. Whether one failed invoice holds up the rest. And whether the person on duty can find the failures while the run is still going. FBR expects each invoice to be sent on its own. So the real question is how your process copes with hundreds of separate answers.
The switch to live
When businesses go live, many failures come from the switch itself, not from the invoices. Test the switch like any other case:
- The production token belongs to the right registration. A token for another registration fails as an access error.
- Live invoices no longer carry the scenario code. FBR’s live system rejects it.
- The IP address FBR approved (whitelisted) is the one your live system sends from.
- Your system sends to FBR’s live address, and test invoices can no longer go there by mistake.
- A person checks the first live invoices one by one, before you open up full volume.
The evidence pack
Keep all the results in one place. For each case, save what was sent, what came back and who checked it. This pack helps you three times: when you decide to go live, when you train new staff, and when your auditor later asks how you proved the setup.
A simple rule for the meeting where you decide to go live. Look at every case in the failure table. If the person who will handle it live could not read and fix it, you are not ready yet.
FAQs
How many test scenarios does FBR assign? Between two and fifteen, depending on the business nature and sector you chose when you enrolled. FBR publishes SN001 to SN028, but no business gets all 28. A service provider selling services clears two.
Why test more than FBR’s scenarios? Because FBR issues the production token automatically once your assigned scenarios pass. The scenarios prove your connection works. They say nothing about whether your products, buyers and staff are ready.
Do our own test invoices need a scenario code? Yes, while they go to FBR’s test system. The test system requires the scenario code and the live system rejects it, so remove it when you switch to live.
What is the lost reply test? You cut the connection while an invoice is being sent. Then you check that your system marks it as unknown and asks whether FBR already has it before resending. FBR does not block duplicates, so a blind resend can file the invoice twice.
Can we check an invoice without filing it? Yes. FBR’s validate method runs the same checks on the same invoice and returns the same errors. It issues no number and files nothing.
Related reading: testing and going live, FBR error codes and what to store once FBR answers.
Ready to simplify your FBR digital invoicing?
Join 2000+ businesses that use eInvoicePro to make invoices and send them to FBR.