El Salvador DTE JSON validator

Paste or upload a DTE JSON and see what the Ministerio de Hacienda would likely reject: schema fields, control number, NIT and DUI, IVA, tributos and totals within the ±0.01 holgura.

Tool

DTE · MH JSON schemas
or drop a file here

Runs in your browser. The file is never uploaded.

Common errors and how to fix them

Ten causes of rejection taken from the official MH JSON schemas and the Manual Funcional del Sistema de Transmisión v2.0.

RuleWhat goes wrongHow to fix it
Schema · requiredA field is left out because it does not apply.Send every field of the schema; use null when the value does not apply.
Schema · additionalA field from another type or version is sent (for example v1 fields in a v2 Factura).Generate each type with the field list of its current schema version.
Section XInumeroControl does not follow DTE-01-M001P001-000000000000001.Build it from the type, establishment, point of sale and a 15-digit sequence.
Schema · patterncodigoGeneracion is lowercase or not a UUID.Generate an uppercase UUID for every document.
Section XXIToo many decimals: items allow 8, the summary allows 2.Round item values to 8 decimals and summary values to 2.
Section XXISummary totals differ from the items by more than one cent.Recalculate the summary from the rounded items.
IVAIVA calculated the wrong way: a Factura includes IVA, CCF and notes do not.Factura: ivaItem = gravada × 13/113. CCF/notes: IVA = (gravada − descuento) × 13% in tributos code 20.
Section XIVA tributo used in the items is missing from resumen.tributos.List each tributo code once in the summary with the consolidated amount.
Section XVA nota de crédito or débito without the related CCF, or items pointing to another document.Add the original document to documentoRelacionado and reference it in each item.
NIT / DUIReceiver DUI with a wrong check digit, or a NIT that is not 14 digits.Validate IDs when you create the customer in your ERP.

Specifications this tool checks against

The schema files are kept with the tool source with their SHA-256 checksums. This tool checks against the published MH specifications; it is not certified by or affiliated with the Ministerio de Hacienda.

How it works

Three steps, no signup

1

Paste or upload the JSON

Use the DTE your system generates before signing, or the signed JWS. Types 01, 03, 05 and 06 are supported.

2

Read the report

Schema errors, arithmetic and business checks are grouped, each with the JSON path and how to fix it.

3

Fix it before MH does

Correct the field in SAP Business One or your ERP, regenerate the JSON and check again. Download the PDF for your team.

FAQ

Questions about this tool

Which DTE types and versions does this check?

Factura (01, schema version 2), Comprobante de Crédito Fiscal (03, version 4), Nota de Crédito (05, version 4) and Nota de Débito (06, version 4), using the JSON schemas the Ministerio de Hacienda publishes on factura.gob.sv.

What does it check beyond the JSON schema?

The control number prefix, NIT and DUI check digits, that each item amount equals quantity × price − discount, IVA included at 13/113 on a Factura and 13% on CCF and notes, tributos consolidated in the summary, related documents on credit and debit notes, and every summary total within the one-cent holgura of the MH Manual Funcional.

Does it check the signature or the reception stamp (sello)?

No. A signed JWS is decoded so its content can be checked, but the signature and the MH sello de recepción are not verified. Only the MH transmission system gives the official result.

Why does MH reject a field that my system leaves out?

The MH schemas list every field as required. When a value does not apply you must still send the field with null. Extra fields that are not in the schema version are also rejected.

Is this an official Ministerio de Hacienda tool?

No. Kodenova is not affiliated with the Ministerio de Hacienda. The tool checks against the published MH specifications.

Is my DTE uploaded anywhere?

No. The JSON is read and checked by your own browser and the PDF is created there too. Nothing is sent to Kodenova or anyone else.

DTE El Salvador from SAP Business One?

We connect SAP B1 to the MH transmission system: JSON, signing, transmission, contingency and invalidation. Fixed price, usually quoted within 24 hours.