PHPackages                             turanjanin/serbian-fiscal-receipts-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. turanjanin/serbian-fiscal-receipts-parser

ActiveLibrary

turanjanin/serbian-fiscal-receipts-parser
=========================================

Library for parsing Serbian fiscal receipts.

2242↓23.8%1PHP

Since Mar 18Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/turanjanin/serbian-fiscal-receipts-parser)[ Packagist](https://packagist.org/packages/turanjanin/serbian-fiscal-receipts-parser)[ RSS](/packages/turanjanin-serbian-fiscal-receipts-parser/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Serbian Fiscal Receipts Parser - PHP library
============================================

[](#serbian-fiscal-receipts-parser---php-library)

This library allows you to parse the contents of URLs encoded within QR codes on Serbian fiscal receipts.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require turanjanin/serbian-fiscal-receipts-parser
```

This package requires PHP 8.1 or newer.

It depends on PSR-7 compatible HTTP client for making HTTP requests. If not explicitly provided, the package will try to detect and instantiate already existing client class.

Usage
-----

[](#usage)

```
$url = 'https://suf.purs.gov.rs/v/?vl=A1ZCTUhYOVNYVzZVQlBaTzCyKwEA%2FmgAAMDh5AAAAAAAAAABhXchESoAAAAP3tYiO2%2BdI6Z5y2v4eC5wJTxirHDeiB1hqaKpgb%2FGvUy6yLkMNgZNqKxLqR40mK2cAfqZmKQ3%2BuCcTbec%2BQ3%2F9YY5EhTDP5HxDNhG%2FugU849FmvrVzP0sKecosSNL10dFtlH8Wgor2A2DDs8sHlmfmpokJnVcm24b%2BCz2bSCSl3HtzGRJ1w4Sw9hhdzsQ4WuPo%2FMEGMlmV8a%2Ffc7X05cWsDCHZoA5uPNWfN%2Bre8%2By5JETDJgRwNDFipYIdh0k62TMp5P0%2FzbCueIJJjas5IxAS9iIdpoTAIIl3eKwUZUWvEwtbGz5nkz52hw5%2Bmg50Uczx1SRifYq%2FEDt79xNkcceS0llpMyNdQ12TSYyL0UjMNymgGX4WPajSzPkQuFBcGLB%2BNLOn2AKLPJXa3B8b87eESXrcIbilNXS3zyr3eg4DIqcTVLXwHwcSh1WDmWKI2TFSu%2Bc6iORB11ln1kYbsEsuCoUegxRJR3RW4%2BkQz45%2Bbm4O5qWTCkDlZ73XHATWPn%2BpPfHP2Fh0Y0QK8gGxNiqrdbob3u0l8uaxKcEDaX%2F4HXnhMezvLEEwBNgWXDMn29uWYx9SWEvPrxV%2FLsIULQbE%2FlcvPeYIla63NhCyuEuGLIlwB2p%2B9O8x7sxD53fTMC7EKKRFUV13WBJS2N5%2BLUh33joYo8Qrc%2BNV2CqrtChYTftFukoKbQvCUKOYYIW0%2FA%3D';

$fetcher = new \Turanjanin\FiscalReceipts\Fetcher();

// Get receipt from the given URL by parsing a web page.
$receipt = $fetcher->fetchFromUrl($url);

// Get receipt from the given URL by fetching the JSON API.
$receipt = $fetcher->fetchFromApi($url);

// Or, if you already have URL content stored in $html variable:
$receipt = $fetcher->fetchFromHtml($html);
```

If you already have a plain text version of the receipt, you can call the Parser class directly:

```
$parser = new \Turanjanin\FiscalReceipts\Parser();
$receipt = $parser->parseJournal($receiptContent);
```

Receipt class will give you access to the following receipt elements:

- Store data
- Receipt number, counter and type
- List of receipt items
- List of all taxes
- Total amount

Alternatively, you can decode receipt URL and extract some of the data offline, without the need for HTTP calls:

```
$payload = \Turanjanin\FiscalReceipts\UrlDecoder::decode($url);

$payload->getTotalAmount();
$payload->getBuyerId();
$payload->getReceiptNumber();
$payload->getReceiptCounter();
$payload->getReceiptDate();
```

Author
------

[](#author)

- [Jovan Turanjanin](https://github.com/turanjanin)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance59

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/68466c69758685978c60a5fdeec67acf59039d386f58033bc110b2f67cfda332?d=identicon)[turanjanin](/maintainers/turanjanin)

---

Top Contributors

[![turanjanin](https://avatars.githubusercontent.com/u/9646495?v=4)](https://github.com/turanjanin "turanjanin (37 commits)")

---

Tags

billsfiscalreceiptsserbia

### Embed Badge

![Health badge](/badges/turanjanin-serbian-fiscal-receipts-parser/health.svg)

```
[![Health](https://phpackages.com/badges/turanjanin-serbian-fiscal-receipts-parser/health.svg)](https://phpackages.com/packages/turanjanin-serbian-fiscal-receipts-parser)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
