API Updates 3 min read

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.

BI

Bilal Ahmed

March 10, 2026

FBR Digital Invoicing API: Complete Integration Guide & Official Documentation Links

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

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

MethodPurpose
POST /InvoiceSubmit a new invoice
POST /Invoice/ValidateValidate invoice before submission
GET /Reference/ProvinceCodeGet province codes
GET /Reference/DocumentTypeIDGet document type codes
GET /Reference/ItemCodeGet item/HS codes
GET /Reference/UOMGet unit of measurement codes

Authentication: OAuth 2.0

To access FBR's API, you need to implement OAuth 2.0 authentication:

  1. Register on FBR Portal: Create your business account on the Digital Invoicing portal
  2. Apply for API Credentials: Request Client ID and Client Secret
  3. Generate Access Token: Use your credentials to obtain a bearer token
  4. 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 TypeDeadlineSRO Reference
Corporate Taxpayers (Tier 1)May 2025SRO 709(I)/2025
Public Companies & ImportersNovember 1, 2025SRO 1852(I)/2025
Remaining Registered BusinessesAs per SRO 288(I)/2026SRO 288(I)/2026

Integration Best Practices

  1. Start with Sandbox: Always test thoroughly before going to production
  2. Validate Before Submit: Use the validation endpoint to catch errors early
  3. Handle Errors Gracefully: Implement proper error handling for API failures
  4. Store FBR Response: Keep the FBR invoice number and QR code for records
  5. 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.

Related Posts