Skip to content

DgiiEmitirFactura

Issues an Electronic Fiscal Receipt (e-CF) of invoice type to the DGII of the Dominican Republic: Tax Credit Invoice (31) or Consumer Invoice (32). The node builds the e-CF XML with issuer, buyer and item data, digitally signs it with XMLDSig using the credential’s .p12 certificate, authenticates against the DGII using the seed mechanism, and performs the reception.

The result includes the TrackId assigned by the DGII, the e-NCF (electronic fiscal receipt number) and the document’s security code. Optionally, the same node can query the final status right after reception.

FieldTypeRequiredDescription
credentials_idcredentialsYesdgii credential
facturajsonNoInvoice as JSON: tipo (31 tax credit, 32 consumer), comprador (rnc, razonSocial — 31 requires RNC), items (precioUnitario without ITBIS). If left empty, the node’s input data is used
consultar_estadobooleanNoQuery the e-CF status right after reception (default yes)

Issuer data (RNC, company name) is automatically filled from the credential when not present in factura.

This module requires a dgii credential type with the following fields:

  • Digital certificate (.p12): signing certificate in base64 (alternatively, private key + certificate in PEM)
  • Certificate password: password for the .p12 file
  • Issuer RNC: tax ID of the company issuing the document (9 to 11 digits)
  • Environment: test, cert (certification) or prod (production)
{
"encf": "E310000000123",
"tipo": "31",
"trackId": "TR-2026-000123456",
"estado": "accepted",
"codigoSeguridad": "Ab3xZ9",
"total": 1180,
"itbis": 180,
"mensajes": [],
"xmlFirmado": "<ECF>...signed...</ECF>"
}

Tax Credit Invoice with one item taxed at 18%

Section titled “Tax Credit Invoice with one item taxed at 18%”
{
"credentials_id": "cred-dgii-prod",
"factura": {
"tipo": "31",
"comprador": {
"rnc": "130123456",
"razonSocial": "Cliente SRL"
},
"items": [
{ "descripcion": "Consulting service", "cantidad": 1, "precioUnitario": 1000 }
]
}
}
  • The factura.items field is required and must have at least one item; if missing, the node returns an error without signing or sending anything.
  • The Tax Credit Invoice (31) requires the buyer’s RNC; the Consumer Invoice (32) does not.
  • If the credential’s .p12 certificate is expired, the node rejects issuance before building the XML.
  • The e-CF can stay in received status (received, unresolved) if consultar_estado is false; use DgiiConsultarEstado later to learn the final result.