PHPackages                             vlm/anaf-php - 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. vlm/anaf-php

ActiveLibrary

vlm/anaf-php
============

Description

V1.0.0.3(3y ago)014MITPHPPHP  ^7.2.5 || ^8.0

Since Apr 26Pushed 3y agoCompare

[ Source](https://github.com/LaurenTziu/anaf-vlm)[ Packagist](https://packagist.org/packages/vlm/anaf-php)[ RSS](/packages/vlm-anaf-php/feed)WikiDiscussions prod Synced yesterday

READMEChangelog (3)Dependencies (9)Versions (5)Used By (0)

 [![ANAF PHP](https://raw.githubusercontent.com/andalisolutions/anaf-php/main/art/social.png)](https://raw.githubusercontent.com/andalisolutions/anaf-php/main/art/social.png)

 [![GitHub Workflow Status (main)](https://camo.githubusercontent.com/877aac6cb3248511e431e4c1a24fb9d0d0c6a28e6075641156b13f4c2cec48f1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616e64616c69736f6c7574696f6e732f616e61662d7068702f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d726f756e642d737175617265)](https://github.com/andalisolutions/anaf-php/actions) [![Total Downloads](https://camo.githubusercontent.com/0f3b0112c0801a63588a1c8d8b7fcefd7efe477306d2af204524d8ec33dad5e8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e64616c69736f6c7574696f6e732f616e61662d706870)](https://packagist.org/packages/andalisolutions/anaf-php) [![Latest Version](https://camo.githubusercontent.com/7c2f7ad7148371a1d1f0d09d04bced19bca1c6d34d00eea89eccc20d84b88512/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616e64616c69736f6c7574696f6e732f616e61662d706870)](https://packagist.org/packages/andalisolutions/anaf-php) [![License](https://camo.githubusercontent.com/c3b5566762aeeec124089b46921b6aae7238a6171c00c6f09482b7c4a1ba80b9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f616e64616c69736f6c7574696f6e732f616e61662d706870)](https://packagist.org/packages/andalisolutions/anaf-php)

---

**ANAF PHP** is a charged PHP API client that allows you to interact with the [ANAF Web Services](https://www.anaf.ro/anaf/internet/ANAF/servicii_online/servicii_web_anaf).

Get Started
-----------

[](#get-started)

> **Requires [PHP 7.3+](https://php.net/releases/)**

First, install ANAF via the [Composer](https://getcomposer.org/) package manager:

```
composer require andalisolutions/anaf-php
```

Then, interact with ANAF's API:

```
$company = Anaf::for('TAX IDENTIFICATION NUMBER');
```

TODO
----

[](#todo)

- Obtaining public information in the financial statements/annual accounting reports related to economic agents. ([Docs](https://static.anaf.ro/static/10/Anaf/Informatii_R/doc_WS_Bilant_V1.txt))
- Get info about taxpayers who are registered according to art. 316 of the Fiscal Code, according to the Register of taxable persons who apply the VAT system upon receipt, according to the Register of inactive/reactive taxpayers, according to the Register of persons who apply the broken down payment of VAT and respectively the RO e-Invoice Register. ([Docs](https://static.anaf.ro/static/10/Anaf/Informatii_R/Servicii_web/doc_WS_V7.txt))
- Get info about taxpayers who are registered in the Register of farmers who apply the special regime ([Docs](https://static.anaf.ro/static/10/Anaf/Informatii_R/documentatie_SWRARG_v2.txt))
- Get info about taxpayers who are registered in the Register of religious entities/units ([Docs](https://static.anaf.ro/static/10/Anaf/Informatii_R/index_cult_v2.html))
- Accessing the functionalities offered by the SPV ([Docs](https://static.anaf.ro/static/10/Anaf/Informatii_R/Prezentare_WS_SPV.txt))
- The national system regarding the electronic invoice RO e-Factura ([Docs](https://mfinante.gov.ro/static/10/eFactura/prezentare%20apeluri%20API%20E-factura.pdf))
- The integrated electronic system RO e-Transport ([Docs](https://www.anaf.ro/anaf/internet/ANAF/servicii_online/servicii_web_anaf))

Usage
-----

[](#usage)

### [Balance Sheet](https://static.anaf.ro/static/10/Anaf/Informatii_R/doc_WS_Bilant_V1.txt) Resource

[](#balance-sheet-resource)

Get public information in the financial statements/annual accounting reports related to economic agents

```
$balanceSheet = $company->balanceSheet()->forYear('2021');
$balanceSheet->year;
$balanceSheet->tax_identification_number;
$balanceSheet->company_name;
$balanceSheet->activity_code;
$balanceSheet->activity_name;
$balanceSheet->indicators; // array
$balanceSheet->indicators['AVERAGE_NUMBER_OF_EMPLOYEES']->value;
$balanceSheet->indicators['NET_LOSS']->value;
$balanceSheet->indicators['NET_PROFIT']->value;
$balanceSheet->indicators['GROSS_LOSS']->value;
$balanceSheet->indicators['GROSS_PROFIT']->value;
$balanceSheet->indicators['TOTAL_EXPENSES']->value;
$balanceSheet->indicators['TOTAL_INCOME']->value;
$balanceSheet->indicators['NET_TURNOVER']->value;
$balanceSheet->indicators['HERITAGE_OF_THE_KINGDOM']->value;
$balanceSheet->indicators['PAID_SUBSCRIBED_CAPITAL']->value;
$balanceSheet->indicators['CAPITAL_TOTAL']->value;
$balanceSheet->indicators['PROVISIONS']->value;
$balanceSheet->indicators['ADVANCE_INCOME']->value;
$balanceSheet->indicators['LIABILITIES']->value;
$balanceSheet->indicators['PREPAYMENTS']->value;
$balanceSheet->indicators['HOME_AND_BANK_ACCOUNTS']->value;
$balanceSheet->indicators['DEBT']->value;
$balanceSheet->indicators['INVENTORIES']->value;
$balanceSheet->indicators['CURRENT_ASSETS']->value;
$balanceSheet->indicators['FIXED_ASSETS']->value;

$balanceSheet->toArray(); // ['year' => '', 'tax_identification_number' => '', 'company_name' => '' ...]
```

*For balance sheets, the indicators may vary depending on the type of company, as specified by ANAF. I recommend you to use var\_dump to observe the type of indicators. The vast majority of companies have the indicators from the example above*

### [Info](https://static.anaf.ro/static/10/Anaf/Informatii_R/Servicii_web/doc_WS_V8.txt) Resource

[](#info-resource)

Checking taxpayers who are registered according to art. 316 of the Fiscal Code in Romania, according to the Register of taxable persons who apply the VAT system upon receipt, according to the Register of inactive/reactive taxpayers, according to the Register of persons who apply the broken down payment of VAT and respectively the RO e-Invoice Register.

```
$companyInfo = $company->info()->get();

$companyInfo->generalData;

/* Accessible information in general data */
$companyInfo->generalData->companyName;
$companyInfo->generalData->address;
$companyInfo->generalData->registrationNumber;
$companyInfo->generalData->phone;
$companyInfo->generalData->fax;
$companyInfo->generalData->postalCode;
$companyInfo->generalData->document;
$companyInfo->generalData->registrationStatus;
$companyInfo->generalData->registrationDate;
$companyInfo->generalData->activityCode;
$companyInfo->generalData->bankAccount;
$companyInfo->generalData->roInvoiceStatus;
$companyInfo->generalData->authorityName;

$companyInfo->vatRegistration;

/* Accessible information in vat registration */
$companyInfo->vatRegistration->status;
//vatPeriods is an array from ANAF v8
$companyInfo->vatRegistration->vatPeriods[0]->startDate
$companyInfo->vatRegistration->vatPeriods[0]->stopDate;
$companyInfo->vatRegistration->vatPeriods[0]->stopEffectiveDate;
$companyInfo->vatRegistration->vatPeriods[0]->message;

$companyInfo->vatAtCheckout;

/* Accessible information in vat at checkout */
$companyInfo->vatAtCheckout->startDate;
$companyInfo->vatAtCheckout->stopDate;
$companyInfo->vatAtCheckout->updateDate;
$companyInfo->vatAtCheckout->publishDate;
$companyInfo->vatAtCheckout->updatedType;
$companyInfo->vatAtCheckout->status;

$companyInfo->inactiveState;

/* Accessible information in inactive state */
$companyInfo->inactiveState->inactivationDate;
$companyInfo->inactiveState->reactivationDate;
$companyInfo->inactiveState->publishDate;
$companyInfo->inactiveState->deletionDate;
$companyInfo->inactiveState->status;

$companyInfo->splitVat;

/* Accessible information in split tva */
$companyInfo->splitVat->startDate;
$companyInfo->splitVat->stopDate;
$companyInfo->splitVat->status;

$companyInfo->hqAddress;

/* Accessible information in hq address */
$companyInfo->hqAddress->street;
$companyInfo->hqAddress->no;
$companyInfo->hqAddress->city;
$companyInfo->hqAddress->cityCode;
$companyInfo->hqAddress->county;
$companyInfo->hqAddress->countyCode;
$companyInfo->hqAddress->countyShort;
$companyInfo->hqAddress->country;
$companyInfo->hqAddress->details;
$companyInfo->hqAddress->postalCode;

$companyInfo->fiscalAddress;

/* Accessible information in fiscal address */
$companyInfo->fiscalAddress->street;
$companyInfo->fiscalAddress->no;
$companyInfo->fiscalAddress->city;
$companyInfo->fiscalAddress->cityCode;
$companyInfo->fiscalAddress->county;
$companyInfo->fiscalAddress->countyCode;
$companyInfo->fiscalAddress->countyShort;
$companyInfo->fiscalAddress->country;
$companyInfo->fiscalAddress->details;
$companyInfo->fiscalAddress->postalCode;

// You can use all resources as array
$companyInfo->toArray(); // ["general_data" => ["tax_identification_number" => '', "company_name" => ''...]..]
// or
$companyInfo->generalData->toArray(); // ['tax_identification_number' => '', 'company_name' => ''...]
```

### [Ngo](https://static.anaf.ro/static/10/Anaf/Informatii_R/index_cult_v2.html) Resource

[](#ngo-resource)

Checking NGO taxpayers who are registered in the Register of religious entities/units

```
$entity = Anaf::for('TAX IDENTIFICATION NUMBER');

$entityInfo = $entity->ngo()->get();

$entityInfo->taxIdentificationNumber;
$entityInfo->searchDate;
$entityInfo->entityName;
$entityInfo->address;
$entityInfo->phone;
$entityInfo->postalCode;
$entityInfo->document;
$entityInfo->registrationStatus;
$entityInfo->startDate;
$entityInfo->endDate;
$entityInfo->status;

// You can use all resources as array
$entityInfo->toArray(); // ["tax_identification_number" => '', "entity_name" => ''...]
```

---

ANAF PHP is an open-sourced software licensed under the **[MIT license](https://opensource.org/licenses/MIT)**.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.3% 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.

###  Release Activity

Cadence

Every ~6 days

Total

3

Last Release

1153d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/78dc4a929629dab2f79972f91d8572de488541e1b5d17c58c5f3b53b948e24ff?d=identicon)[LaurenTziu](/maintainers/LaurenTziu)

---

Top Contributors

[![ciungulete](https://avatars.githubusercontent.com/u/742128?v=4)](https://github.com/ciungulete "ciungulete (16 commits)")[![LaurenTziu](https://avatars.githubusercontent.com/u/84506936?v=4)](https://github.com/LaurenTziu "LaurenTziu (6 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

phpsdkanaf

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vlm-anaf-php/health.svg)

```
[![Health](https://phpackages.com/badges/vlm-anaf-php/health.svg)](https://phpackages.com/packages/vlm-anaf-php)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[xeroapi/xero-php-oauth2

Xero official PHP SDK for oAuth2 generated with OpenAPI spec 3

1054.7M18](/packages/xeroapi-xero-php-oauth2)[resend/resend-php

Resend PHP library.

617.2M43](/packages/resend-resend-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34216.9k2](/packages/onesignal-onesignal-php-api)

PHPackages © 2026

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