PHPackages                             pauloak/nfse-lajeado - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. pauloak/nfse-lajeado

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

pauloak/nfse-lajeado
====================

Package used to create NFSE on Lajeado-RS.

1.0.2(3y ago)01.0k1MITPHPPHP &gt;=7

Since Feb 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/PauloAK/nfse-lajeado)[ Packagist](https://packagist.org/packages/pauloak/nfse-lajeado)[ RSS](/packages/pauloak-nfse-lajeado/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

Brief
-----

[](#brief)

This package currently supports creating, retrieving and canceling NFS-e (RPS) in the WebService of the city of Lajeado/RS - Brazil.

Package
-------

[](#package)

You can install it through composer

```
composer require pauloak/nfse-lajeado
```

Observation
-----------

[](#observation)

To be able to use the package, you'll need to have a valid .pfx certificate and the password to access it, it's used to sign the XML before sending it to the city WebService.

Usage
-----

[](#usage)

You can check some usage examples in the [examples](examples) folder, but here's a quick overview.

### Create NFS-e

[](#create-nfs-e)

*Needs a .pfx certificate*

```
use PauloAK\NfseLajeado\EnviarLoteRpsEnvio;
use PauloAK\NfseLajeado\Common\Rps;
use PauloAK\NfseLajeado\Common\Rps\Endereco;
use PauloAK\NfseLajeado\Common\Rps\Prestador;
use PauloAK\NfseLajeado\Common\Rps\Servico;
use PauloAK\NfseLajeado\Common\Rps\Tomador;
use PauloAK\NfseLajeado\Helpers\Constants;

const CERTIFICATE_PATH = '/path/to/certificate.pfx';
const CERTIFICATE_PASS = 'rand_pass';

$tomador = (new Tomador)
    ->cpfCnpj('000.000.000-00')
    ->telefone('51 99999-9999')
    ->email('email@example.com')
    ->razaoSocial('Example')
    ->endereco(
        (new Endereco)
            ->rua('Av. Test')
            ->numero('0000')
            ->bairro('Centro')
            ->codigoMunicipio('4311403') // IBGE Code
            ->uf('RS')
            ->cep('95900-000')
            ->complemento('')
    );

$servico = (new Servico)
    ->codigoCnae('0000000')
    ->itemListaServico('000')
    ->discriminacao('Test RPS')
    ->issRetido(Constants::NAO)
    ->valorServicos(99.99);

$prestador = (new Prestador)
    ->cnpj('00.000.0000/0001-00')
    ->im('00000');

$rps = (new Rps)
    ->tomador($tomador)
    ->prestador($prestador)
    ->servico($servico)
    ->serie('00000')
    ->numero(1)
    ->naturezaOperacao(Constants::NATUREZA_OPERACAO_IMPOSTO_RECOLHIDO_PELO_REGIME_UNICO_TRIBUTACAO)
    ->optanteSimplesNacional(Constants::SIM);

$lote = (new EnviarLoteRpsEnvio(CERTIFICATE_PATH, CERTIFICATE_PASS))
    ->numeroLote(2)
    ->cnpj('00.000.000/0001-00')
    ->im('00000')
    ->rps($rps);

// Sends to Homologation
$response = $lote->sendHml();

// See Responses section
if ($response->success) {
    // ...
}

// Sends to Production
// $response = $lote->send();
```

### Retrieve NFS-e

[](#retrieve-nfs-e)

*Does NOT need a .pfx certificate*

After you create an NFS-e, you'll receive a protocol number which you can use to retrieve the NFS-e. Currently, this package only returns the NFS-e number and the verification code.

```
use PauloAK\NfseLajeado\Common\Rps\Prestador;
use PauloAK\NfseLajeado\ConsultarLoteRpsEnvio;

$consulta = (new ConsultarLoteRpsEnvio)
    ->prestador(
        (new Prestador)
            ->cnpj('00.000.000/0001-00')
            ->im('00000')
    )
    ->protocolo('00000'); // The protocol number returned in the creation call

// Sends to homologation
$response = $consulta->sendHml();

// See Responses section
if ($response->success) {
    // ...
}
```

### Cancel NFS-e

[](#cancel-nfs-e)

*Needs a .pfx certificate*

To cancel an NFS-e, you'll need the NFS-e number and the certificate.

```
use PauloAK\NfseLajeado\CancelarRps;

const CERTIFICATE_PATH = '/path/to/certificate.pfx';
const CERTIFICATE_PASS = 'rand_pass';

$cancelamento = (new CancelarRps(CERTIFICATE_PATH, CERTIFICATE_PASS))
    ->cnpj('00.000.000/0001-00')
    ->im('00000')
    ->numero('00000');

// Sends to homologation
$response = $cancelamento->sendHml();

// See Responses section
if ($response->success) {
    // ...
}
```

### Responses

[](#responses)

All the above requests return a `PauloAK\NfseLajeado\Helpers\Response::class` instance, the object looks like this:

```
(object)[
    'success' => true, // bool - Boolean representing if the call was successfull
    'requestXml' => '...', // string - The XML that was sent to the WebService
    'responseXml' => '...', // string - The response XML returned from the WebService
    'data' => [], // array - Some quick access data parsed from the request
    'errorCode' => 'E...', // string - In case of failure, the error code returned
    'errorMessage' => '...', // string - The detailed error message in case of failure
    'isHml' => false // bool - Shows in which envioriment the call was made
];
```

#### Create Response

[](#create-response)

In case of success, the data variable in the response object should look like this:

```
[
    'nextLoteNumber' => 999, // Last Lote number + 1, you can use it in the next create call
    'nextRpsNumber' => 999, // Last RPS number + 1, you can use it in the next create call
    'protocolNumber' => '123456' // Protocol number, you can use it to retrieve the NFS-e
]
```

#### Retrieve Response

[](#retrieve-response)

In case of success, the data variable in the response object should look like this:

```
[
    'number' => '20231', // NFS-e number
    'verificationNumber' => '12346', // NFS-e verification code
    'pdfUrl' => 'https://...' // URL to the NFSE PDF document - Only works for production
]
```

You can see all the other info from the NFS-e XML in `$response->responseXml`;

#### Cancel Response

[](#cancel-response)

The cancel request doesn't return data info in the response, use the `$response->success` variable to check if it was successfully canceled or not.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

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 ~1 days

Total

3

Last Release

1181d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d73518c4b2e30a45bc5c1a2d697c7da61ae35d6da4d3261690dfc5abd0fac5c8?d=identicon)[PauloAK](/maintainers/PauloAK)

---

Top Contributors

[![PauloAK](https://avatars.githubusercontent.com/u/24625797?v=4)](https://github.com/PauloAK "PauloAK (7 commits)")

---

Tags

composernfsephpsoap

### Embed Badge

![Health badge](/badges/pauloak-nfse-lajeado/health.svg)

```
[![Health](https://phpackages.com/badges/pauloak-nfse-lajeado/health.svg)](https://phpackages.com/packages/pauloak-nfse-lajeado)
```

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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