NFC-e integration API (electronic consumer invoice) with PHP


Does anyone know of any Electronic Consumer Invoice integration manual for PHP usage? I am developing a system that contains sales control, and I would need to issue an NFC-e, but I do not find any documentation talking about it anywhere.

asked by anonymous 28.07.2015 / 21:06

2 answers


The Farm does not provide any tutorial or anything else based on language, it only provides information about webservice addresses on the URL WebService .

The documentation and XML Schemas can be found at Current Archives .

You just need to know how to program, that with this information you can use webservice in any language.

To access webservices you can use the PHP cURL library:

Together with an XML library:

Or you can use the third-party NFePHP Library , available from GitHub.

28.07.2015 / 21:42

In addition to direct communication with revenue you can use commercial APIs that will eventually save your development time. In addition to the one already pointed out by KaduAmaral I recommend the Focus NFe API ( link ) that has PHP-ready examples using PECL or CURL

An intermediate option would be to generate the file in the SEFAZ application format and use the free issuer .

I work in the company that provides the API mentioned above and if you understand that this is the best way I am at your disposal. Otherwise the two paths pointed out (NFe PHP and what I mentioned about the free sender) are great options.

04.11.2015 / 12:05