Skip to content

DgiConsultarCFE

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.

FieldTypeRequiredDescription
credentials_idcredentialsYesdgi credential
tipo_cfetextYesCFE type (101, 111, …)
serietextYesCFE series
numerotextYesCFE number
soap12booleanNoUse SOAP 1.2 instead of 1.1

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) or prod (production)
{
"tipoCfe": 111,
"serie": "A",
"numero": 159,
"encontrado": true,
"estado": "Recibido",
"codigo": "00",
"glosa": "CFE recibido correctamente"
}
{
"credentials_id": "cred-dgi-prod",
"tipo_cfe": "111",
"serie": "A",
"numero": "159"
}
  • All three fields tipo_cfe, serie and numero are 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 encontrado output field indicates whether the DGI has a record of the document; it can be false if 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.