PHPackages                             itrack/anaf - 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. [API Development](/categories/api)
4. /
5. itrack/anaf

ActiveLibrary[API Development](/categories/api)

itrack/anaf
===========

API ANAF pentru verificarea contribuabililor care sunt inregistrati conform art. 316 din Codul Fiscal

3.1.0(12mo ago)15041.4k—6.5%32[3 PRs](https://github.com/itrack/anaf/pulls)MITPHPPHP &gt;=7.1 || &gt;=8.0CI passing

Since Jan 17Pushed 12mo ago16 watchersCompare

[ Source](https://github.com/itrack/anaf)[ Packagist](https://packagist.org/packages/itrack/anaf)[ Docs](https://devgeeks.ro)[ RSS](/packages/itrack-anaf/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (12)Used By (0)

API ANAF
========

[](#api-anaf)

Librarie PHP pentru verificarea gratuita a contribuabililor care sunt inregistrati conform art. 316 din Codul Fiscal

[![Latest Version](https://camo.githubusercontent.com/5c971f153da37bc681ec35571d9d998a6e2aeb530ecae331fa7a2014813f02d6/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f69747261636b2f616e61662e737667)](https://packagist.org/packages/itrack/anaf)[![Build Status](https://github.com/itrack/anaf/actions/workflows/tests.yml/badge.svg)](https://app.travis-ci.com/itrack/anaf)[![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://vshymanskyy.github.io/StandWithUkraine/)

---

Date care pot fi obtinute:

- Denumire/Adresa companie
- Numar Registrul Comertului
- Numar de telefon
- Platitor/Neplatitor TVA
- Platitor TVA la incasare
- Platitor Split TVA pana la 1 februarie 2020 (**OUG 23/2017 privind plata defalcată a TVA a fost abrogata incepand cu 1 februarie 2020**)
- IBAN Split TVA
- Data inregistrare TVA
- Status Societate (Activa/Inactiva)
- Data radiere

❤️ Daca iti este de folos te rog sa oferi o stea ⭐

Instalare
=========

[](#instalare)

```
composer require itrack/anaf
```

Exemplu de folosire
===================

[](#exemplu-de-folosire)

- Initializare librarie

```
$anaf = new \Itrack\Anaf\Client();
```

### Pentru a verifica doar un CUI foloseste metoda

[](#pentru-a-verifica-doar-un-cui-foloseste-metoda)

```
$cif = "123456";
$dataVerificare = "YYYY-MM-DD";
$anaf->addCif($cif, $dataVerificare);
```

#### Conform exemplului de mai jos:

[](#conform-exemplului-de-mai-jos)

```
$cif = "123456";
$dataVerificare = "2019-05-20";
$anaf->addCif($cif, $dataVerificare);
$company = $anaf->first();

// Metode disponibile
echo $company->getName();
echo $company->getCIF();
echo $company->getRegCom();
echo $company->getPhone();

echo $company->getFullAddress();
echo $company->getAddress()->getCity();
echo $company->getAddress()->getCounty();
echo $company->getAddress()->getStreet();
echo $company->getAddress()->getStreetNumber();
echo $company->getAddress()->getPostalCode();
echo $company->getAddress()->getOthers();

echo $company->getTVA()->hasTVA();
echo $company->getTVA()->getTVAEnrollDate();
echo $company->getTVA()->getTVAEndDate();

echo $company->getTVA()->hasTVACollection();
echo $company->getTVA()->getTVACollectionEnrollDate();
echo $company->getTVA()->getTVACollectionEndDate();

echo $company->getTVA()->hasTVASplit();
echo $company->getTVA()->getTVASplitEnrollDate();
echo $company->getTVA()->getTVASplitEndDate();
echo $company->getTVA()->getTVASplitIBAN();

echo $company->getReactivationDate();
echo $company->getInactivationDate();
echo $company->getDeletionDate();
echo $company->isActive();
```

### Pentru a verifica mai multe CUI-uri in acelasi timp urmeaza exemplul de mai jos:

[](#pentru-a-verifica-mai-multe-cui-uri-in-acelasi-timp-urmeaza-exemplul-de-mai-jos)

```
$anaf->addCif("123456", "2019-05-20");
$anaf->addCif("RO654321"); // Daca data nu este setata, valoarea default va fi data de azi
$raspuns = $anaf->get();

// SAU

$cifs = [
  "123456",
  "RO6543221"
];
$anaf->addCif($cifs, "2019-05-20");
$raspuns = $anaf->get();
```

Limite
======

[](#limite)

Poti solicita raspuns pentru maxim 100 de CUI-uri simultan cu o rata de 1 request / secunda.

Requirements
============

[](#requirements)

- PHP &gt;= 7.1 | &gt;= 8
- Ext-Curl
- Ext-Json
- Ext-Mbstring

Exceptii:
=========

[](#exceptii)

- Itrack\\Anaf\\Exceptions\\LimitExceeded - Ai depasit limita de 100 de CUI-uri / request;
- Itrack\\Anaf\\Exceptions\\ResponseFailed - Raspunsul primit de la ANAF nu este in format JSON, exceptia returneaza body-ul raspunsului pentru a fi verificat manual;
- Itrack\\Anaf\\Exceptions\\RequestFailed - Raspunsul primit de la ANAF nu are status de succes, verifica manual raspunsul primit in exceptie.

Upgrade de la 2 la 3
====================

[](#upgrade-de-la-2-la-3)

Versiunea 2 nu este compatibila cu versiunea 3, daca aveti o implementare veche, trebuie modificata pentru a fi compatibila.

Contribuitori
=============

[](#contribuitori)

[![Contribuitori](https://camo.githubusercontent.com/e621b4806ac9b5a51243d394a6844cb732606bd47c8de17c0e9d945830d58380/68747470733a2f2f636f6e7472696275746f72732d696d672e66697265626173656170702e636f6d2f696d6167653f7265706f3d69747261636b2f616e6166)](https://github.com/itrack/anaf/graphs/contributors)

Linkuri utile
=============

[](#linkuri-utile)

[https://static.anaf.ro/static/10/Anaf/Informatii\_R/Servicii\_web/doc\_WS\_V9.txt](https://static.anaf.ro/static/10/Anaf/Informatii_R/Servicii_web/doc_WS_V9.txt)

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance50

Moderate activity, may be stable

Popularity47

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 74% 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 ~268 days

Recently: every ~338 days

Total

11

Last Release

362d ago

Major Versions

v1.0.2 → 2.0.02019-06-01

2.0.1 → 3.0.02021-02-11

PHP version history (3 changes)v1.0PHP &gt;=5.5

3.0.0PHP &gt;=7.1

3.0.4PHP &gt;=7.1 || &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/59b3256e974f7816de4ef82f232f742e6f1e21517d72539a6f3792311c2eccc0?d=identicon)[itrack](/maintainers/itrack)

---

Top Contributors

[![itrack](https://avatars.githubusercontent.com/u/2368391?v=4)](https://github.com/itrack "itrack (37 commits)")[![edrep](https://avatars.githubusercontent.com/u/1156737?v=4)](https://github.com/edrep "edrep (6 commits)")[![niladam](https://avatars.githubusercontent.com/u/4151765?v=4)](https://github.com/niladam "niladam (3 commits)")[![lucionescu](https://avatars.githubusercontent.com/u/138441275?v=4)](https://github.com/lucionescu "lucionescu (1 commits)")[![ionutpaun](https://avatars.githubusercontent.com/u/36838738?v=4)](https://github.com/ionutpaun "ionutpaun (1 commits)")[![firewizard](https://avatars.githubusercontent.com/u/1143980?v=4)](https://github.com/firewizard "firewizard (1 commits)")[![BogdanSchimbischi](https://avatars.githubusercontent.com/u/25983339?v=4)](https://github.com/BogdanSchimbischi "BogdanSchimbischi (1 commits)")

---

Tags

anafcifcomertuluifiscalmfinantephpregistrultaxestvavat-identificationverificare tvainregistrat tvaapi anafwebservie anafdate firmamfinante

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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