The FBR Digital Invoicing (DI) API is the interface PRAL exposes so licensed integrators and invoicing software can validate and post sales tax invoices. Official detail lives in FBR's technical documentation (e.g. DI API Technical Documentation V1.12) and the Digital Invoicing User Manual - this article is a plain-language map, not a substitute for those PDFs.
Validate and post
Compliant software sends structured JSON payloads to PRAL endpoints. The API checks seller/buyer identifiers, sale type, HS codes, quantities, UOM, tax amounts, and related fields. A successful post returns an invoice number issued by the FBR system plus status data you must persist. Failed validation returns error codes you fix before retrying.
Sandbox vs production
Sandbox mirrors rules without affecting live tax records. You receive a sandbox security token after IP whitelisting, complete assigned scenarios, then move to production tokens. Production posting without sandbox completion is not the documented path.
QR code printing
Technical docs require the Digital Invoicing logo and QR on each issued invoice. Published QR printing guidance includes Version 2.0 (25×25) and approximately 1.0 × 1.0 inch dimensions - confirm the current PDF before print templates go live.
Fields teams get wrong
Common payload fields include seller NTN, buyer registration type and NTN/CNIC, invoice date, sale type, HS code per line, quantity and UOM, values excluding sales tax, sales tax, further/extra/withheld tax where applicable, and SRO schedule references when required. Same HS code with different sale types must remain distinct lines (FBR FAQ on SKUs). For debit notes, reference invoice length rules differ for NTN vs CNIC cases in the API documentation.
DI CRM
PRAL provides Digital Invoicing CRM support for integration issues. Keep registration and ticket numbers handy - many “API bugs” are master-data mismatches.
Taxora.pk
Taxora.pk implements validate/post workflows so finance teams do not build against the DI API from scratch. See connect PRAL and bulk upload.
More guides
- 01FBR Sandbox vs Production TokensBearer tokens from PRAL unlock validate and post. Same API URLs, different environments. How to get sandbox th…Open
- 02FBR Sandbox Scenarios ExplainedWhat sandbox scenario testing is for, why edge cases matter more than the happy path, and how to prepare your …Open
- 03PRAL vs Licensed Integrator vs Invoicing SoftwarePRAL’s free API path, paid licensed integrators, and managed invoicing software solve different jobs. A practi…Open
- 04FBR DI Sandbox & IP WhitelistingHow IRIS Digital Invoicing registration, IP whitelisting, sandbox tokens, and scenario testing work before pro…Open