Skip to content

SifenKuDE

Generates the KuDE (Kuatia’i De, the Electronic Document’s graphical representation) with its public-lookup QR code. The node can take an already-issued CDC and retrieve the signed rDE from the database, or receive a DE in JSON to preview before issuing. It returns HTML that can be printed directly to PDF, along with the QR code’s URL and its base64 image.

FieldTypeRequiredDescription
credentials_idcredentialsYesSIFEN credential (provides the CSC for the QR)
cdctextNoCDC of an already-issued DE, 44 digits. Retrieves the signed rDE from the database
dejsonNoDE in JSON to preview, when no CDC is provided

This module requires a sifen credential; in addition to the usual fields (.p12 certificate, RUC and environment), it provides the CSC ID and CSC (Taxpayer Security Code) needed to build the QR code’s hash.

{
"success": true,
"cdc": "01800123456001001000001234567890123456789012",
"html": "<html>...</html>",
"qrUrl": "https://ekuatia.set.gov.py/consultas/qr?nVersion=150&...",
"qrHash": "a1b2c3d4e5f6...",
"qrImage": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...",
"digestValue": "aGFzaERlbERvY3VtZW50bw=="
}
{
"credentials_id": "cred-sifen-prod",
"cdc": "01800123456001001000001234567890123456789012"
}
{
"credentials_id": "cred-sifen-prod",
"de": {
"tipoDE": 1,
"numero": 4,
"receptor": { "ruc": "80012345-6", "razonSocial": "Empresa Cliente S.A." },
"items": [{ "descripcion": "Consulting services", "cantidad": 1, "precioUnitario": 2500000, "ivaTipo": 10 }]
}
}
  • With a CDC, it retrieves the signed rDE from the database and generates the QR with a complete cHashQR (official voucher)
  • Without a CDC, it builds the DE on the spot to preview: the document is unsigned, so the QR does not include the real DigestValue
  • The QR uses the CSC configured in the credential; without a valid CSC, the public QR lookup will fail on DNIT’s site
  • The returned HTML is meant to be printed or converted to PDF directly, with no further processing