PHPackages                             hazzo/laravel-afip-wrapper - 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. hazzo/laravel-afip-wrapper

ActiveLibrary

hazzo/laravel-afip-wrapper
==========================

Afip Web Service wrapper for Laravel

v1.0.0-beta2(8y ago)2261[1 issues](https://github.com/hazzo/laravel-afip-wrapper/issues)MITPHP

Since Aug 13Pushed 8y agoCompare

[ Source](https://github.com/hazzo/laravel-afip-wrapper)[ Packagist](https://packagist.org/packages/hazzo/laravel-afip-wrapper)[ RSS](/packages/hazzo-laravel-afip-wrapper/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

Laravel AFIP Web Service Wrapper
================================

[](#laravel-afip-web-service-wrapper)

AFIP technical documentation for their Web Service [AFIP Web Service](http://www.afip.gob.ar/ws/paso4.asp?noalert=1)

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

[](#installation)

Type in your terminal:

```
composer require hazzo/LaravelAfipWrapper

```

Register AfipWrapper by adding it to the service providers on the `app.php`.

```
'providers' => array(
        ...
        hazzo\LaravelAfipWrapper\Providers\AfipWsServiceProvider::class
    )

```

Let's add the facade in the bottom of the same file in aliases.

```
'aliases' => array(
        ...
        'AfipWS' => hazzo\LaravelAfipWrapper\Facades\AfipWs::class,
    )

```

Publish the package configuration file.

```
php artisan vendor:publish --provider="hazzo\laravel-afip-wrapper\Providers\AfipWsServiceProvider" --tag="config"

```

### Configuration

[](#configuration)

Config file options:

OptionDefaultValues`afipTempFolder`'' (Automatically the package will choose */temp* as folder in root directory)Any string. Ex.: `storage_path('app/afip')``afipEnvironment`'' (Automatically the package will choose *DEV* environment)Two options `DEV` or `PROD`, for homologation and production endpoints for AFIP Web Service.Usage samples
-------------

[](#usage-samples)

Generate **token** and **sign** to get auth data and perform later actions.

Options `array` for method `generateLTR` *(LoginTicketRequest)*:

- `cuit`: Cuit of user that is going to use the web service
- `cn`: *commonName* field of user that is going to use the web service
- `id`: 32 bit digit that together with `genTime` will be used by the web service to identify the request
- `privateKey`: Path where the private key generated by the AFIP site is stored
- `pemCert`: Path where the CSR Certificate used to generate the private key is stored
- `genTime`: Generation time of the authentication. Must be ISO8601 formatted. If not given the pacakge will set it to *today*
- `expTime`: Expiration time of the authentication. Must be ISO8601 formatted. If not given the pacakge will set it to *today* + 24hs. The max tolerance for expiration is 24hs from the generation time.

```
use hazzo\LaravelAfipWrapper\AfipWs;

   $afipWs = new AfipWs();

   $options = [
       'cuit' => '2020200200',
       'cn' => 'test',
       'id' => 1,
       'privateKey' => './AfipPrivateKey.key',
       'pemCert' => './MyPEMKey.crt'
   ];

   $ltr = $afipWs->generateLTR($options);
   $afipWs->generateTRA($ltr);

   var_dump($afipWs->token);
   var_dump($afipWs->sign);
   var_dump($afipWs->cuit);

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~3 days

Total

2

Last Release

3190d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6b9d21264a5e37a06a8ca2ccf223945d4738e5651cb18260d688e34d210c314e?d=identicon)[hazzo](/maintainers/hazzo)

---

Top Contributors

[![hazzo](https://avatars.githubusercontent.com/u/13692810?v=4)](https://github.com/hazzo "hazzo (25 commits)")

---

Tags

laravelpackageafipAfipWSAfip Web service

### Embed Badge

![Health badge](/badges/hazzo-laravel-afip-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/hazzo-laravel-afip-wrapper/health.svg)](https://phpackages.com/packages/hazzo-laravel-afip-wrapper)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40129.3k2](/packages/erlandmuchasaj-laravel-gzip)[joggapp/laravel-aws-sns

Laravel package for the SNS events by AWS

3171.8k](/packages/joggapp-laravel-aws-sns)

PHPackages © 2026

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