MH El Salvador — Electronic invoicing (Hacienda, DTE)
Overview
Section titled “Overview”The MH nodes connect your workflows to El Salvador’s electronic invoicing (Ministry of Finance, DTE). Unlike other countries, El Salvador’s DTE is a JSON document signed with JWS (RS512) and sent over REST with a prior authentication token. Floogos builds the JSON, signs it, gets the token and performs the reception with Hacienda, returning the Reception Seal.
| Node | What it does |
|---|---|
MH: Issue invoice (mhEmitirFactura) | Issues a consumer invoice (type 01), VAT included |
MH: Tax credit / Note (mhEmitirComprobante) | Issues a Tax Credit Voucher (03), Credit (05) or Debit (06) Note |
MH: Void DTE (mhAnular) | Invalidates a received DTE by its Generation Code |
MH: Rendering / QR (mhRepresentacion) | Generates the printable rendering with QR |
Credential
Section titled “Credential”The nodes use a credential of type MH. Create it under Credentials → Add → El Salvador / Hacienda with:
| Field | Description |
|---|---|
| Issuer NIT | The tax ID (no dashes). |
| NRC | Taxpayer Registration Number. |
| API username and password | Hacienda portal credentials to get the token. |
| Private key (.p12 or PEM) | To sign the DTE (JWS). |
| Name / Trade name | Issuer details. |
| Economic activity | Code and description. |
| Establishment and location | Establishment code, point of sale, address, municipality, department. |
| Environment | Test (00) or Production (01). |
Issue an invoice (type 01)
Section titled “Issue an invoice (type 01)”Node: MH: Issue invoice. For final consumers the receptor is optional. Example:
{ "items": [ { "descripcion": "Product", "cantidad": 1, "precioUnitario": 113 } ]}In the Invoice (01), precioUnitario is VAT-inclusive; Floogos computes the taxable base and the VAT (13%).
Tax credit and notes (03 / 05 / 06)
Section titled “Tax credit and notes (03 / 05 / 06)”Node: MH: Tax credit / Note. In the Tax Credit Voucher (03) and notes, VAT is a tribute (code 20, 13%) and is not included in the price: precioUnitario is without VAT. The receptor must be a taxpayer (with NIT and NRC).
{ "tipo": "03", "receptor": { "nit": "06140101801011", "nrc": "1234567", "nombre": "B2B Client Inc." }, "items": [ { "descripcion": "Consulting service", "cantidad": 1, "precioUnitario": 100 } ]}Notes (05 credit, 06 debit) reference the origin document via documentoRelacionado (the Generation Code of the original CCF):
{ "tipo": "05", "receptor": { "nit": "06140101801011", "nrc": "1234567", "nombre": "B2B Client Inc." }, "documentoRelacionado": { "codigoGeneracion": "ABCD1234-...", "fecha": "2026-07-29" }, "items": [ { "descripcion": "Return", "cantidad": 1, "precioUnitario": 20 } ]}Void a DTE
Section titled “Void a DTE”Node: MH: Void DTE. Invalidates a received DTE by its Generation Code (with a mandatory reason). Floogos recovers the original DTE data from the database, builds the invalidation event, signs it with JWS and sends it.
Printable rendering (QR)
Section titled “Printable rendering (QR)”Node: MH: Rendering / QR. Generates the printable rendering in HTML (exportable to PDF), with the Generation Code, the Control Number, the Reception Seal and the QR pointing to Hacienda’s public lookup (admin.factura.gob.sv/consultaPublica).
Error handling
Section titled “Error handling”| Situation | Retryable | What to do |
|---|---|---|
| Hacienda rejects (RECHAZADO) | No | The node returns the observations. Fix the DTE. |
| Invalid token / auth | No | Check the API username and password. |
| Expired key | No | Renew the .p12 / key and update the credential. |
| Network / Timeout | Yes | Transient; automatically retried. |
See also
Section titled “See also”- Retry queue (DLQ) — how failed executions are retried.
- HTTP node — for services not covered by these nodes.