Emissão de CF-e¶
O XML para emissão de CF-e segue o padrão estabelecido pela SEFAZ.
Exemplo de XML de Entrada¶
<?xml version="1.0" encoding="utf-8"?>
<CFe>
<infCFe versaoDadosEnt="0.07">
<ide>
<ident>1234</ident>
<CNPJ>11111111111111</CNPJ>
<signAC>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</signAC>
<numeroCaixa>123</numeroCaixa>
</ide>
<emit>
<CNPJ>11111111111111</CNPJ>
<IE>111111111111</IE>
<indRatISSQN>N</indRatISSQN>
</emit>
<dest>
<CPF>11111111111</CPF>
<xNome>NF-E EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL</xNome>
</dest>
<det nItem="1">
<prod>
<cProd>975176</cProd>
<xProd>NOTA FISCAL EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL</xProd>
<NCM>61062000</NCM>
<CFOP>5102</CFOP>
<uCom>UN</uCom>
<qCom>1.0000</qCom>
<vUnCom>15.00</vUnCom>
<indRegra>A</indRegra>
</prod>
<imposto>
<vItem12741>4.72</vItem12741>
<ICMS>
<ICMS00>
<Orig>0</Orig>
<CST>00</CST>
<pICMS>18.00</pICMS>
</ICMS00>
</ICMS>
<PIS>
<PISAliq>
<CST>01</CST>
<vBC>75.12</vBC>
<pPIS>0.0165</pPIS>
</PISAliq>
</PIS>
<COFINS>
<COFINSAliq>
<CST>01</CST>
<vBC>75.12</vBC>
<pCOFINS>0.0760</pCOFINS>
</COFINSAliq>
</COFINS>
</imposto>
<infAdProd>Informacao Adicional - Trib aprox R$: 2,02 Federal, R$: 2,70 Estadual</infAdProd>
</det>
<total>
<vCFeLei12741>4.72</vCFeLei12741>
</total>
<pgto>
<MP>
<cMP>04</cMP>
<vMP>75.12</vMP>
</MP>
</pgto>
<infAdic>
<infCpl>Informacao Complementar - Trib aprox R$: 2,02 Federal, R$: 2,70 Estadual FONTE IBPT</infCpl>
</infAdic>
</infCFe>
</CFe>
Exemplo de resposta de Sucesso¶
<OracleRoot xmlns="">
<SatResponse id="">
<EnviarDadosVenda>
<Field1>999999</Field1>
<Field2>06000</Field2>
<Field3>0000</Field3>
<Field4>Emitido com sucesso</Field4>
<Field5 />
<Field6 />
<Field7>PD94bWwgdmVy ... 48L0NGZT4K</Field7>
<Field8>01/01/2018 12:00:00</Field8>
<Field9>99999999999999999999999999999999999999999999</Field9>
<Field10>99.99</Field10>
<Field11>99999999999</Field11>
<Field12>CdRcJEKBpT ... eLywEN0CmYF0oLBjj73w==</Field12>
</EnviarDadosVenda>
</SatResponse>
</OracleRoot>
Exemplo de Resposta com Falha¶
<OracleRoot xmlns="">
<SatResponse id="">
<EnviarDadosVenda>
<Field1>999999</Field1>
<Field2>06010</Field2>
<Field3>1999</Field3>
<Field4>Erro na validação do conteúdo</Field4>
<Field5 />
<Field6 />
<Field7 />
<Field8 />
<Field9 />
<Field10 />
<Field11 />
<Field12 />
</EnviarDadosVenda>
</SatResponse>
</OracleRoot>