Developer-First REST API

FBR API Integration for POS, ERP & Business Software

Connect custom applications, ERP systems, billing engines, and e-commerce checkouts directly to Pakistan's digital invoicing infrastructure with clean REST JSON endpoints.

Sub-100ms Validation

Local schema verification validates buyer tax status, HS code formats, and SRO rules before transmission to prevent redundant round-trips.

Secure Token Auth

Granular API tokens with customizable permission scopes, IP restriction rules, and full request/response audit trails.

Instant Sandbox

Test all transaction types (standard sales tax, 3rd schedule, export, exempt, zero-rated) in an isolated sandbox before going live.

POST /api/v1/fbr/invoices/submit
JSON Payload
Request Body
{
  "invoice_number": "INV-2026-00412",
  "invoice_date": "2026-10-07",
  "buyer_ntn": "1234567-8",
  "buyer_name": "Karachi Trading Co",
  "lines": [
    {
      "description": "Industrial Valve",
      "hs_code": "8481.8090",
      "quantity": 10,
      "unit_price": 5000,
      "sales_tax_rate": 18
    }
  ]
}
Response (200 OK)
{
  "status": "success",
  "irn": "FBR-DI-2026-8947219482",
  "qr_data": "https://taxasaan.fbr.gov.pk/verify?...",
  "qr_image_base64": "data:image/png;base64,iVBOR...",
  "total_sales_tax": 9000.00,
  "net_total": 59000.00,
  "timestamp": "2026-10-07T18:41:00Z"
}

Developer & Integration FAQs

Technical insights on integrating DIFBR API with your business software.

What is the DIFBR FBR API?

The DIFBR API is a modern RESTful JSON service that abstracts complex FBR fiscal formatting rules, HS code schemas, and security handshakes into clean, documented HTTP endpoints.

How does authentication work for the FBR API?

DIFBR uses standard Bearer Token authentication via secure API keys generated directly from your business settings portal, backed by IP whitelisting and rate limiting.

What does an invoice submission payload look like?

You send standard JSON including buyer details (NTN/CNIC/STRN), item lines (description, quantity, rate, HS code), and applicable tax rates. DIFBR validates calculations and converts the payload into FBR-compliant schemas.

How does the API return IRN and QR code details?

Upon successful submission, the API returns HTTP 200 with an official IRN string, QR code raw payload, base64 encoded QR image string, and FBR receipt timestamp.

Is there a sandbox environment for testing before production?

Yes. DIFBR provides a full-featured sandbox testing environment with simulated FBR responses, validation errors, and sample test scenarios so developers can test thoroughly.

How are network timeouts and FBR downtime handled?

DIFBR offers idempotent requests and automatic retry policies. If the tax authority service is momentarily unreachable, requests can be queued safely with zero duplicate invoice risk.

What programming languages are supported?

Because DIFBR uses standard REST JSON architecture, it can be integrated using any language or framework: PHP/Laravel, Python, Node.js, C#/.NET, Java, Go, Ruby, and legacy desktop environments.

Is DIFBR an FBR licensed integrator?

DIFBR is a digital invoicing software platform developed by Cloud ERP 360 (Private) Limited. DIFBR manages your invoicing workflows, validates data schemas, and connects to applicable FBR integration channels. DIFBR does not misrepresent itself as an FBR licensed intermediary.

Integrate FBR Digital Invoicing in Days, Not Months

Get full API documentation, sandbox credentials, and pre-built code samples for your development team.