DgiConsultarCFE
Description
Section titled “Description”Queries the status of a Comprobante Fiscal Electronico (CFE) directly at the DGI, identifying it by type, series and number. It is useful to verify a document’s actual situation before the authority or to reconcile after running the daily report, instead of relying solely on the locally stored status.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | dgi credential |
| tipo_cfe | text | Yes | CFE type (101, 111, …) |
| serie | text | Yes | CFE series |
| numero | text | Yes | CFE number |
| soap12 | boolean | No | Use SOAP 1.2 instead of 1.1 |
Credentials
Section titled “Credentials”This module requires a dgi credential type with the following fields:
- Certificate (.p12): advanced signature certificate in base64
- Certificate password: password for the .p12 file
- RUT: issuer’s tax ID
- Environment:
test(homologation) orprod(production)
Output
Section titled “Output”{ "tipoCfe": 111, "serie": "A", "numero": 159, "encontrado": true, "estado": "Recibido", "codigo": "00", "glosa": "CFE recibido correctamente"}Usage Example
Section titled “Usage Example”{ "credentials_id": "cred-dgi-prod", "tipo_cfe": "111", "serie": "A", "numero": "159"}- All three fields
tipo_cfe,serieandnumeroare required; without them the node returns an error before querying the DGI. - If the DGI returns a SOAP Fault, the node translates it into an error using the returned message.
- The
encontradooutput field indicates whether the DGI has a record of the document; it can befalseif the daily report including it has not been sent yet. - Combine this node with DgiReporteDiario to automatically reconcile the status of documents issued during the day.
Related Nodes
Section titled “Related Nodes”- DgiEmitirCFE - Issue the CFE that is later queried
- DgiReporteDiario - Report the CFE before it becomes visible at the DGI