Skip to content

MH El Salvador — Electronic invoicing (Hacienda, DTE)

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.

NodeWhat 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

The nodes use a credential of type MH. Create it under Credentials → Add → El Salvador / Hacienda with:

FieldDescription
Issuer NITThe tax ID (no dashes).
NRCTaxpayer Registration Number.
API username and passwordHacienda portal credentials to get the token.
Private key (.p12 or PEM)To sign the DTE (JWS).
Name / Trade nameIssuer details.
Economic activityCode and description.
Establishment and locationEstablishment code, point of sale, address, municipality, department.
EnvironmentTest (00) or Production (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%).

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 } ]
}

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.

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).

SituationRetryableWhat to do
Hacienda rejects (RECHAZADO)NoThe node returns the observations. Fix the DTE.
Invalid token / authNoCheck the API username and password.
Expired keyNoRenew the .p12 / key and update the credential.
Network / TimeoutYesTransient; automatically retried.