NFC-e (consumer invoice) integration API with PHP

Asked

Viewed 7,532 times

7

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

2 answers

8


The Farm does not provide any tutorial or anything else based on language, only provides information on the addresses of webservice on the page URL Webservice.

Documentation and XML Schemas can be found on the page Arquivos Vigentes.

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

To access the webservices you can use the PHP Curl library:

Together with an XML library:

Or you can use the Nfephp library third party, available on Github.

4

In addition to direct communication with revenue you can use commercial Apis that will eventually save your development time. In addition to the already pointed out by Kaduamaral recommend the Focus Nfe API (https://focusnfe.com.br/nfce-documentacao/) which has ready-made PHP examples using PECL or CURL

An intermediate option would be to generate the file in the SEFAZ SP 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 available. Otherwise the two paths pointed (PHP Nfe and what I mentioned about the free sender) are great options.

  • Ricardo, do you work for this company? If so, please make that clear, or your response may be considered spam. Thank you.

  • 1

    Ready @bfavaretto. If you look I never put this answer in any other question, only in this one where it asks clearly about Apis. Thanks for the tip.

  • Much improved this way.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.