Download the PHP package fbr/digital-invoicing without Composer

On this page you can find all versions of the php package fbr/digital-invoicing. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package digital-invoicing

FBR Digital Invoicing Laravel Package

Latest Version on Packagist GitHub Tests Action Status Total Downloads License: MIT PHP Version

A comprehensive Laravel package for integrating with Pakistan's Federal Board of Revenue (FBR) Digital Invoicing System API v1.12.

Features

Installation

Install the package via Composer:

Publish the configuration file:

Publish and run the migrations:

Configuration

Add the following to your .env file:

The configuration file config/fbr-digital-invoicing.php contains all available options:

Quick Start

Basic Invoice Creation and Submission

Validation Before Submission

Using Database Models

Supported Scenarios

The package supports all 28 official FBR sandbox testing scenarios based on "DI Scenarios Description for Sandbox Testing" v1.11:

Manufacturing & Standard Sales (SN001-SN009)

SN001: Sale of Standard Rate Goods to Registered Buyers

SN002: Sale of Standard Rate Goods to Unregistered Buyers

SN003: Sale of Steel (Melted and Re-Rolled) - Billets, Ingots and Long Bars

SN004: Sale of Steel Scrap by Ship Breakers

SN005: Sales of Reduced Rate Goods (Eighth Schedule)

SN006: Sale of Exempt Goods (Sixth Schedule)

SN007: Sale Of Zero-Rated Goods (Fifth Schedule)

SN008: Sale of 3rd Schedule Goods

SN009: Purchase From Registered Cotton Ginners

Services & Specialized Industries (SN010-SN019)

SN010: Sale Of Telecom Services by Mobile Operators

SN011: Sale of Steel through Toll Manufacturing - Billets, Ingots and Long Bars

SN012: Sale Of Petroleum Products

SN013: Sale Of Electricity to Retailers

SN014: Sale of Gas to CNG Stations

SN015: Sale of Mobile Phones

SN016: Processing / Conversion of Goods

SN017: Sale of Goods Where FED Is Charged in ST Mode

SN018: Sale Of Services Where FED Is Charged in ST Mode

SN019: Sale of Services (as per ICT Ordinance)

Specialized Products & Retail (SN020-SN028)

SN020: Sale of Electric Vehicles

SN021: Sale of Cement /Concrete Block

SN022: Sale of Potassium Chlorate

SN023: Sale of CNG

SN024: Sale Of Goods Listed in SRO 297(1)/2023

SN025: Drugs Sold at Fixed ST Rate Under Serial 81 Of Eighth Schedule Table 1

SN026: Sale Of Goods at Standard Rate to End Consumers by Retailers

SN027: Sale Of 3rd Schedule Goods to End Consumers by Retailers

SN028: Sale of Goods at Reduced Rate to End Consumers by Retailers

Using Scenarios in Code

Reference Data APIs

Access FBR reference data easily:

Artisan Commands

Sync Reference Data

Available sync types:

Queue Configuration

For background processing, configure your queues:

Run queue worker:

QR Code Generation

Generate QR codes as per FBR requirements:

Error Handling

The package provides comprehensive error handling:

Database Models

Invoice Model

InvoiceItem Model

Testing

The package includes comprehensive tests:

Example Integration

See the examples/basic-usage.php file for comprehensive usage examples covering:

  1. Basic invoice creation and submission
  2. Validation before submission
  3. Using database models and background jobs
  4. Fetching reference data
  5. Creating scenario-based invoices
  6. Checking registration status

Error Codes

The package handles all FBR error codes as documented in the API specification:

Sales Error Codes (0001-0300, 0401-0402)

Purchase Error Codes (0156-0177)

Common error codes:

API Rate Limiting

The package includes built-in retry logic with exponential backoff:

Logging

All API interactions are logged when enabled:

Log entries include:

Production Considerations

  1. Environment Configuration:

  2. Queue Workers: Set up supervised queue workers
  3. Monitoring: Monitor queue jobs and failed jobs
  4. Caching: Reference data is cached for 30 days by default
  5. Logging: Review logs regularly for errors
  6. Rate Limiting: Respect FBR API rate limits

Security

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.

Support


Disclaimer: This package is not officially affiliated with FBR Pakistan. It is a third-party integration built according to the official FBR Digital Invoicing API specification v1.12.


All versions of digital-invoicing with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
illuminate/http Version ^9.0|^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fbr/digital-invoicing contains the following files

Loading the files please wait ...