The Spanish version is the authoritative reference. View in Spanish
πΈπ» El Salvador
This sheet assumes you know the xPOS-Core communication protocol. El Salvador is the only country with Pattern B: JSON output and validation against JSON Schema.
Summaryβ
| Aspect | Value |
|---|---|
country code | sv |
| Tax authority | DGII |
| Pattern | B β JSON with JSON Schema |
Supported inputType | json, xml |
| Extra endpoint | β |
| Output | Signed tax JSON (not XML) |
XSLT mappingβ
| XSLT | Use |
|---|---|
input_to_dte_sv.xslt | json and xml inputs β XML <root> β Gosocket XML. |
dte_to_fiscal_sv.xslt | Gosocket XML β DGII tax JSON. |
custom_response_sv.xslt | Generates custom_response when applicable. |
Document types (typeDoc)β
WebSocket example uses
typeDoc=3. The parameter is numeric:typeDoc=1andtypeDoc=01are equivalent.
typeDoc | Document |
|---|---|
| 01 | Invoice |
| 03 | Fiscal credit voucher |
| 04 | Dispatch note |
| 05 | Credit note |
| 06 | Debit note |
| 07 | Withholding voucher |
| 08 | Settlement voucher |
| 09 | Accounting settlement document |
| 11 | Export invoice |
| 14 | Excluded subject invoice |
| 15 | Donation voucher |
Each type validates against its own JSON Schema (Pattern B). Types 01, 03, 04, 05, 06, 11 and 14 support issuance in contingency. The contingency and voiding events are internal and are not sent as typeDoc.
El Salvador-specific response fieldsβ
El Salvador returns the core + full tax echo (statusCode/Description/Message, applicationResponse, timeGeneration/Validation).
countryIdentificationCode in El Salvador is the DGII generation code.
Contingency codes (contingencyCode)β
Automatic contingencies are determined by xPOS. Manual ones are declared by the POS in the document (motivo.tipoContingencia), when xPOS cannot determine them automatically.
contingencyCode | Type | Reason |
|---|---|---|
1 | Automatic | The Ministry of Finance system is unavailable |
3 | Automatic | Failure in the issuer's internet service |
2 | Manual | The issuer's system is unavailable |
4 | Manual | Failure in the issuer's electricity supply that prevents transmitting the DTEs |
5 | Manual | Other: the POS declares the document in contingency with this code and explains the reason, with a maximum of 500 characters |
The dashboard's manual contingency emulates an internet outage: it answers 3.
WebSocket exampleβ
Illustrative values. The structure is real; the data are examples. In El Salvador
outputandsignedXmlcontain a signed JSON DTE encoded in base64 (not XML, due to Pattern B).
{
"env": "sbx",
"operation": "consolidate",
"typeDoc": 3,
"country": "sv",
"inputType": "json",
"origin": "<issuer taxId>",
"document": { /* DTE El Salvador */ }
}Particular notesβ
- Pattern B: the
outputis JSON, not XML. Validation occurs against JSON Schema instead of XSD. - Publishes in Inbox-Gosocket.
- The
txtandxdocformats are not available in El Salvador; usejsonorxml. - Contingency regularization is preceded by the event: xPOS first declares the contingency event before the Ministry of Finance (signed, with the real window and the reason), then sends the documents it covers, and closes the event when all of them reach their final status. A document in contingency is not resent on its own: it waits for its event to be declared.