Your first FBR e-invoice, start to finish: sandbox token to QR-coded PDF
A practical walkthrough of issuing your first FBR digital invoice — getting the IRIS sandbox token, passing the sandbox scenarios, switching to production and printing the QR-coded PDF.
Most of what is written about FBR digital invoicing explains the rules. This post does the other thing: it walks through the actual sequence of steps between "we have been told to integrate" and "an invoice with an FBR number and a QR code is in the customer's inbox", using Raseed Pro as the example. If you use different software the order is the same; only the screens differ.
Budget an afternoon the first time. Most of that is waiting on IRIS, not on you.
Step 1: Get a sandbox token from IRIS
Everything starts in IRIS, the FBR portal where your sales tax registration lives. Under the digital invoicing section you register your business activity and sector, and IRIS gives you two things: a sandbox token (a long bearer string) and a list of scenario IDs you must pass before a production token is issued. A goods business typically gets somewhere between six and twelve scenarios; our sandbox scenarios guide lists all 28 and explains how they are assigned.
Two things trip people up here. First, the token is tied to the NTN that requested it; a tax consultant onboarding several clients needs one per client, not one for the firm. Second, the activity and sector you pick decide which scenarios you get, and changing them later means re-running scenarios. Pick what the business actually does, not what it might do next year.
Step 2: Load your masters before you touch an invoice
An FBR invoice is mostly reference data: HS codes, units of measure, provinces, sale types, SRO schedules and item serials, all as exact strings from FBR's own lists. Typing them per invoice is how businesses end up with hundreds of rejected submissions.
In Raseed Pro the masters are set up once per company and linked to FBR's reference lists:
- Seller profile — NTN or CNIC, business name, province and address exactly as registered. These go on every invoice as the seller snapshot.
- Buyers — registered buyers with their NTN; unregistered buyers with the NTN left blank and the registration type set accordingly. This matters because sales to unregistered buyers attract further tax.
- Products — each with an HS code, a unit of measure that FBR accepts for that HS code, a sale type and a rate. Third-schedule goods also need a retail price, because tax is charged on the retail price rather than the sale value.
Paste the sandbox token into the workspace's FBR setup page. It is stored encrypted and is never shown again, so keep a copy somewhere safe.
Step 3: Pass the sandbox scenarios
Each scenario is a test invoice of a particular shape: standard-rate goods to a registered buyer, the same to an unregistered buyer, a reduced-rate sale, an exempt sale, a zero-rated export, and so on. IRIS tracks which scenarios have had a successful sandbox submission and releases the production token once every assigned scenario has one.
Raseed Pro generates a draft invoice for each scenario from your masters and posts it to the FBR sandbox; you can run all of them in one go or one at a time. When one fails, the FBR response usually points at a single field. The common ones:
| Rejection | What it almost always means |
|---|---|
| Invalid HS code / UOM combination | The unit of measure is not on FBR's list for that HS code. Change the UOM on the product, not the invoice. |
| Sales tax withheld must be 0 or equal to sales tax | Withholding was entered as a partial amount. It is all or nothing per line. |
| Buyer registration type mismatch | Buyer has an NTN but is marked unregistered, or the reverse. |
| SRO schedule / serial required | The rate you chose is a notified reduced rate; FBR needs the SRO reference that grants it. |
Fix the master record, re-run that scenario, move on. Test invoices are flagged as tests and kept out of your reports, so running a scenario five times does not pollute your sales figures.
Step 4: Switch to production
Once IRIS shows every scenario passed, it issues a production token. Paste it in, and switch the workspace from sandbox to production. Raseed Pro will not let you switch until the scenarios are complete and the production token is saved, because a production invoice that fails validation is a real problem for the business rather than a test to re-run.
Two differences between the environments are worth knowing. The scenarioId field is sandbox-only and is omitted from production payloads. And in production the FBR invoice number comes back from the gateway and is final; there is no "delete and resubmit". Corrections are done through a debit note that references the original invoice.
Step 5: Issue a real invoice
A real invoice is now a short form: pick the buyer, add lines from your products, enter quantities and prices. Everything else is derived. For one line of 2,356 units at Rs 7.90 with 18% sales tax:
| Amount (PKR) | |
|---|---|
| Value excluding sales tax | 18,612.40 |
| Sales tax @ 18% | 3,350.23 |
| Total | 21,962.63 |
The arithmetic is the boring part until it is wrong by one paisa and FBR rejects the invoice. Half-up rounding to two decimals on each line, further tax at 4% of the ex-tax value where it applies, withholding as a percentage of the sales tax, FED where the item is in sales tax mode: Raseed Pro computes every line and total the same way the FBR validator does, so the numbers on the PDF and the numbers in the payload are identical by construction.
Validate first — that posts the payload to FBR's validation endpoint and returns any errors without recording anything. Submit when validation is clean. The response carries the FBR invoice number, which is stamped on the invoice and locks it from further edits.
Step 6: Print and send
The PDF is generated from the submitted invoice: seller and buyer details, line items with HS codes and rates, totals, the amount in words, the FBR invoice number and the QR code that encodes it. The QR code is what a buyer or an FBR officer scans to confirm the invoice exists in FBR's system. Email the PDF to the customer, and the activity log records who submitted what and when, which is what you will want when a return is reconciled months later.
What to do next week
Three things make the second month easier than the first:
- Clean up masters as you go. Every rejected production invoice traces back to a product or buyer record. Fix the record, not the invoice.
- Watch the correction window. FBR's rules around correcting a submitted invoice have changed more than once; our penalties guide covers the current position and the Section 33 penalty ladder. Do not rely on being able to fix an invoice days later.
- Export monthly. Raseed Pro's CSV export of submitted invoices lines up with what your tax consultant needs for the sales tax return. Send it to them on the first of the month, every month.
If you are a tax consultant onboarding several clients, the sequence above repeats per NTN. A tenant account in Raseed Pro lets you run it for each client from one login, with each client's tokens and masters kept separate.
This post describes the process as of October 2026 and the software's behaviour at the time of writing. FBR rules and IRIS screens change; confirm your own obligations with your tax adviser or the FBR.