FBR Digital Invoicing API: Complete Integration Guide & Official Documentation Links
A comprehensive guide to FBR e-invoicing API integration with official documentation links, endpoints, authentication methods, and step-by-step instructions for Pakistani businesses.
Bilal Ahmed
March 10, 2026
Integrating your business systems with FBR's Digital Invoicing (DI) portal is now mandatory for many Pakistani businesses. This comprehensive guide provides all the official documentation links, API endpoints, and step-by-step instructions you need for successful integration.
Official FBR Documentation Links
FBR has released official technical documentation for API integration. Here are the direct links to all essential resources:
Primary Documentation
- Technical Documentation Portal - Main FBR page for Digital Invoicing API documentation
- Technical API Documentation PDF (V1.12) - Complete API specifications, endpoints, and JSON formats
- Digital Invoicing User Manual (V1.4) - Step-by-step user guide for the DI portal
- DI Technical Assistance - Legal provisions, licensed integrators list, and support resources
API Integration Overview
FBR's Digital Invoicing system uses real-time Web API for invoice data sharing. Here's what you need to know:
Data Format Requirements
- Format: JSON (JavaScript Object Notation)
- Protocol: RESTful Web API
- Authentication: OAuth 2.0
- Token Validity: 5 years
Required Invoice Fields
Every e-invoice must include:
- Seller information (NTN, STRN, name, address)
- Buyer information (NTN/CNIC, name, address)
- Itemized descriptions with HS codes
- Tax calculations (Sales Tax, FED, etc.)
- Mandatory QR code for verification
API Endpoints & Environments
Sandbox Environment (Testing)
Before going live, test your integration in the sandbox environment:
- Base URL: Provided in technical documentation
- Purpose: Test invoice submission, validation, and response handling
- No real tax implications
Production Environment
After successful testing, move to production:
- Base URL: Provided after sandbox approval
- All invoices are legally binding
- Real-time submission to FBR
Key Web Methods
| Method | Purpose |
|---|---|
| POST /Invoice | Submit a new invoice |
| POST /Invoice/Validate | Validate invoice before submission |
| GET /Reference/ProvinceCode | Get province codes |
| GET /Reference/DocumentTypeID | Get document type codes |
| GET /Reference/ItemCode | Get item/HS codes |
| GET /Reference/UOM | Get unit of measurement codes |
Authentication: OAuth 2.0
To access FBR's API, you need to implement OAuth 2.0 authentication:
- Register on FBR Portal: Create your business account on the Digital Invoicing portal
- Apply for API Credentials: Request Client ID and Client Secret
- Generate Access Token: Use your credentials to obtain a bearer token
- Include Token in Requests: Add the token to all API calls in the Authorization header
Licensed Integrators
FBR has approved several licensed integrators to help businesses connect:
Free Integration Service
- Pakistan Revenue Automation Limited (PRAL) - Free integration and sandbox testing
Paid Integration Services
- Haball (Pvt) Ltd
- EY (Pvt) Ltd
- WebDNAworks (Pvt) Ltd
- And other FBR-approved integrators
You can find the complete list of licensed integrators on the FBR Technical Assistance page.
Important Compliance Deadlines
Make sure you're aware of the phased implementation deadlines:
| Business Type | Deadline | SRO Reference |
|---|---|---|
| Corporate Taxpayers (Tier 1) | May 2025 | SRO 709(I)/2025 |
| Public Companies & Importers | November 1, 2025 | SRO 1852(I)/2025 |
| Remaining Registered Businesses | As per SRO 288(I)/2026 | SRO 288(I)/2026 |
Integration Best Practices
- Start with Sandbox: Always test thoroughly before going to production
- Validate Before Submit: Use the validation endpoint to catch errors early
- Handle Errors Gracefully: Implement proper error handling for API failures
- Store FBR Response: Keep the FBR invoice number and QR code for records
- Monitor Token Expiry: Implement token refresh logic
Need Help?
If you're looking for a hassle-free integration solution, Digital Invoices provides complete FBR e-invoicing compliance. Our platform handles all API integration, invoice generation, and submission automatically.
Get Started with Digital Invoices →
This guide is updated regularly to reflect the latest FBR requirements. Last updated: March 2026.