Skip to content

SunatConsultarTicket

Queries the status of a ticket previously returned by a daily boletas summary or by a void communication (the getStatus operation). While SUNAT is still processing it, the node returns enProceso as true. Once processed, it reads the CDR (accepted, observed or rejected) and updates the status of the summary stored in the database.

FieldTypeRequiredDescription
credentials_idcredentialsYesSUNAT credential
tickettextYesTicket returned by the summary or void to query

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

  • Certificate (.p12): the issuer’s digital certificate
  • Certificate password
  • Issuer RUC (11 digits)
  • SOL user and SOL password: SUNAT Clave SOL credentials
  • Mode: direct (to SUNAT) or OSE (Electronic Services Operator)
  • OSE URL, if mode is OSE
  • Environment: beta (testing) or production
{
"ticket": "1234567890",
"enProceso": false,
"estado": "accepted",
"codigo": "0",
"descripcion": "El Resumen numero RC-20260101-1, ha sido aceptado",
"notas": [],
"statusCode": "0"
}
{
"credentials_id": "cred-sunat-prod",
"ticket": "1234567890"
}
  • statusCode 0 means processed; statusCode 99 means processed with errors (the node maps it to estado rejected).
  • While enProceso is true, retry the query later, for example with a wait node or a short cron.
  • The result also updates the summary or void record that was stored when it was sent.