DgiiEmitirFactura
Description
Section titled “Description”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.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | dgii credential |
| factura | json | No | Invoice 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_estado | boolean | No | Query 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.
Credentials
Section titled “Credentials”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) orprod(production)
Output
Section titled “Output”{ "encf": "E310000000123", "tipo": "31", "trackId": "TR-2026-000123456", "estado": "accepted", "codigoSeguridad": "Ab3xZ9", "total": 1180, "itbis": 180, "mensajes": [], "xmlFirmado": "<ECF>...signed...</ECF>"}Usage Example
Section titled “Usage Example”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.itemsfield 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
receivedstatus (received, unresolved) ifconsultar_estadois false; use DgiiConsultarEstado later to learn the final result.
Related Nodes
Section titled “Related Nodes”- DgiiEmitirNota - Issue a credit or debit note referencing this e-CF
- DgiiConsultarEstado - Query the final status by TrackId
- DgiiRepresentacion - Generate the printable representation with QR