FelEmitirNota
Description
Section titled “Description”Issues a Credit Note (NCRE) or Debit Note (NDEB) as a DTE in Guatemala under the SAT’s FEL regime. The note always references the origin document (typically the invoice issued with felEmitirFactura) through its UUID.
The node builds the note’s DTE, optionally signs it with the issuer’s certificate, and sends it to the certified provider to certify it with the SAT, returning a new UUID of its own for the note.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | FEL credential |
| nota | json | No | Note (JSON): tipo (NCRE/NDEB), receptor, items, referencia {uuid, serie, numero, fecha, motivo} of the origin document. If omitted, the input data is used |
Credentials
Section titled “Credentials”This module requires a fel credential type (certifying provider, provider username/password or key, issuer NIT, optional .p12 certificate, environment).
Output
Section titled “Output”{ "uuid": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "tipo": "NCRE", "estado": "certified", "serie": "A", "numero": "205", "referencia": { "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "total": 1120.5, "xml": "<...>"}Usage Example
Section titled “Usage Example”{ "credentials_id": "cred-fel-prod", "nota": { "tipo": "NCRE", "receptor": { "nit": "CF", "nombre": "Consumidor Final" }, "items": [ { "cantidad": 1, "descripcion": "Service refund", "precioUnitario": 1120.5, "bienOServicio": "S" } ], "referencia": { "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "motivo": "Partial cancellation of the service" } }}- The
tipofield acceptsNCRE(credit note),NDEB(debit note) orNABN; it defaults toNCREif omitted. - The note is rejected if it does not include
referencia.uuid(orreferencia.numeroAutorizacion) of the origin document. - As with
felEmitirFactura, if no issuer certificate is loaded in the credential, the certifying provider signs the note for you. - The returned
uuidis different from the origin document’s: it identifies the note itself, not the referenced invoice.
Related Nodes
Section titled “Related Nodes”- FelEmitirFactura - Issue the origin invoice
- FelAnular - Cancel an already certified DTE
- FelRepresentacion - Generate the printable representation with QR