Skip to content

MhEmitirComprobante

Issues a Tax Credit Voucher (type 03), a Credit Note (type 05) or a Debit Note (type 06) to El Salvador’s Ministry of Finance (Hacienda). Unlike the consumer invoice, VAT in this document is broken out as a separate tribute instead of being included in the price.

Credit and debit notes reference the original tax document through documentoRelacionado. The node builds the DTE in JSON, signs it with JWS (RS512) and performs the reception against Hacienda.

FieldTypeRequiredDescription
credentials_idcredentialsYesmh credential (key, NIT and Hacienda API)
comprobantejsonNoVoucher as JSON: tipo (03 CCF, 05 CN, 06 DN), receptor (nit, nrc, nombre), items (precioUnitario without VAT). For notes: documentoRelacionado with codigoGeneracion and fecha

Issuer data is automatically filled from the credential when not present in comprobante.

This module requires an mh credential type with the following fields:

  • Issuer NIT / NRC: taxpayer tax identification
  • Hacienda API user and password: credentials used to obtain the authentication token
  • Signing certificate: material used to sign the document with JWS (RS512)
  • Environment: test or production, according to Hacienda’s configured environment
{
"success": true,
"codigoGeneracion": "B2C3D4E5-F6A7-1234-5678-9ABCDEF01234",
"numeroControl": "DTE-03-00000001-000000000000001",
"selloRecibido": "2026080598765432109876543210987654",
"estado": "PROCESADO",
"fhProcesamiento": "05/08/2026 11:02:10"
}
{
"credentials_id": "cred-mh-prod",
"comprobante": {
"tipo": "03",
"receptor": {
"nit": "06141804941035",
"nrc": "123456",
"nombre": "Distribuidora SA de CV"
},
"items": [
{
"descripcion": "Mixed merchandise",
"cantidad": 10,
"precioUnitario": 100
}
]
}
}
{
"credentials_id": "cred-mh-prod",
"comprobante": {
"tipo": "05",
"receptor": {
"nit": "06141804941035",
"nrc": "123456",
"nombre": "Distribuidora SA de CV"
},
"documentoRelacionado": {
"codigoGeneracion": "B2C3D4E5-F6A7-1234-5678-9ABCDEF01234",
"fecha": "2026-08-05"
},
"items": [
{
"descripcion": "Merchandise return",
"cantidad": 2,
"precioUnitario": 100
}
]
}
}
  • The items’ precioUnitario does not include VAT; the tribute is calculated and broken out separately at 13%.
  • Credit and Debit Notes require documentoRelacionado with the codigoGeneracion and date of the voucher being corrected.
  • The document type (03, 05 or 06) determines the structure and validations Hacienda applies to the DTE.
  • Just like the invoice, the voucher only becomes valid once Hacienda responds PROCESADO with the Reception Seal.