FBR Digital Invoicing Sandbox vs Production (2026)
FBR sandbox vs production in 2026: 28 test scenarios, _sb web addresses, a 5-year token and what changes when you go live. Checked against DI API v1.12.
What is the sandbox system in FBR digital invoicing? (short answer)
Updated November 2026. The FBR digital invoicing sandbox (FBR's free practice system where test invoices do not count) is a copy of the live system for testing. Production is the live system. There, every accepted invoice becomes a real sales tax invoice with an IRN (Invoice Reference Number — the unique number FBR gives every invoice). PRAL's DI API v1.12 document lists 28 sandbox test scenarios, SN001 to SN028. You pass the ones for your business, then switch to production.
This page explains the difference, what changes when you go live, and why a first live invoice sometimes fails. Every fact here is checked against PRAL's DI API Technical Documentation v1.12, read on 29 November 2026. Source: https://download1.fbr.gov.pk/Docs/20257301172130815TechnicalDocumentationforDIAPIV1.12.pdf
What is the difference between FBR sandbox and production?
FBR digital invoicing sandbox and production use the same invoice fields, the same checks and the same error codes. The difference is the result. A sandbox invoice is a test that FBR checks and then ignores. A production invoice is a legal sales tax invoice. It goes into FBR's record, it can show in your buyer's Annexure-A (the purchase list in the monthly sales tax return), and it carries a real IRN and QR code.
Difference 1 — the web address. The v1.12 document lists sandbox addresses that end in "_sb", for example https://gw.fbr.gov.pk/di_data/v1/di/postinvoicedata_sb. The production address has no "_sb": https://gw.fbr.gov.pk/di_data/v1/di/postinvoicedata.
Difference 2 — the token. PRAL issues a security token (a long secret code your software sends with every invoice). The v1.12 document says sandbox and production routing "will be based on the security token being used". So a sandbox token cannot post a live invoice.
Difference 3 — the scenarioId field. A sandbox invoice carries a test number such as "SN001". The document marks this field "Sandbox only". Live invoices leave it out.
Difference 4 — what counts. Sandbox invoices are never issued sales tax invoices. Only production invoices count for your return and your buyer's input tax (the sales tax a buyer paid and may subtract from the tax they owe).
Which FBR sandbox scenarios do I have to pass?
You pass only the FBR sandbox scenarios that match the business activity and sector in your sales tax profile, not all 28. PRAL's v1.12 table maps each activity to its scenarios. For example, a manufacturer in "All Other Sectors" gets 11 scenarios: SN001, SN002, SN005, SN006, SN007, SN015, SN016, SN017, SN021, SN022 and SN024.
Retail scenarios have their own rule. The document says: "Scenarios ID 26,27 & 28 are applicable only if registered as retailer in sales tax profile." (DI API v1.12, section 9). So you will not get SN026 to SN028 unless your profile says retailer.
Each scenario, with the sale type it tests, is explained in FBR Digital Invoicing Sandbox Testing Scenarios (SN001–SN028) Explained.
What changes when I move from sandbox to production?
Moving from the FBR digital invoicing sandbox to production changes three things: the token, the web address and the scenarioId field. The invoice data itself stays the same. Once PRAL issues your production token, your software sends it with each live invoice. PRAL's own words on the token: "This security token will have a validity of 5 Years" (DI API v1.12, section 3.1).
A worked check. In sandbox you post scenario SN001: goods at the standard rate to a registered buyer. Value Rs 10,000. Sales tax at 18% is Rs 1,800. Total Rs 11,800. FBR replies with statusCode "00", which means valid. In production you send the same line with the same values, but without scenarioId. FBR replies "00" again and returns a real invoice number. The v1.12 sample reply shows one in this shape: 7000007DI1747119701593.
The steps to request each token are in How to Get Your FBR Digital Invoicing Token (Sandbox & Production) in 2026. The full set-up order is in How to Register for FBR Digital Invoicing (2026): Step by Step on IRIS.
Why does an invoice pass in sandbox but fail in production?
An FBR digital invoice that passes in sandbox can still fail in production for four common reasons. The sandbox token is still in the software. The scenarioId field was left in. The buyer's NTN or STRN is not active in FBR's live records. Or the HS code and unit of measure do not match. FBR then replies with statusCode "01" (invalid) and an error code.
HTTP replies help you find the cause fast. The v1.12 document lists three: 200 (OK), 401 (Unauthorized) and 500 (Internal Server Error — contact PRAL). A 401 right after go-live usually points to the token.
Every error code and its fix is listed in FBR Digital Invoicing Error Codes: The Complete Reference (0001–0402).
How does Digi Invoice handle sandbox and production?
Digi Invoice supports both FBR digital invoicing environments. You run your sandbox scenarios first. Then you add your production token and post live invoices without changing how you work. The same checks run before every post, so a wrong HS code or buyer NTN is caught before FBR sees it. Digi Invoice costs PKR 1,000 per month with unlimited invoices and no setup fee.
Need help with your scenarios or your token? Contact Digi Invoice — WhatsApp 0300 8680363, Monday to Saturday, 10:00 AM to 5:00 PM. You can also create an account at https://digi-invoice.online/register.
Difficult words in this guide
Sandbox — FBR's free practice system where test invoices do not count.
Production — the live FBR system; every accepted invoice is a real sales tax invoice.
Security token — a secret code from PRAL that your software sends with each invoice to prove who you are.
scenarioId — a sandbox-only field that tells FBR which test case (SN001 to SN028) an invoice belongs to.
statusCode — FBR's reply on each invoice: "00" means valid and "01" means invalid.