Skip to content

cucuCufd

Manages the CUFD (Daily Unique Billing Code) of a point of sale: see the active one, regenerate it or “ensure” a valid one exists (renews only if none or expiring soon). CUCU renews it on its own; use it at the start of the day or on the cufd.renewal_failed event.

Part of the Bolivia Fiscal Hub as an alternative to connecting directly to SIAT: CUCU is an authorised provider handling signing, CUIS/CUFD codes and submission to the SIN. Node: “CUFD del punto de venta”.

FieldTypeRequiredDescription
credentials_idcredentialsYescucu credential
operationselectNoOperation — ensure, get, renew
pos_idtextNoPoint of sale (UUID) — Empty = the credential default point of sale
renew_before_minutesnumberNoRenew if expiring within (min)
output_keytextNoOutput key — The result is added to data[key] keeping the rest of the data

This module requires a credential of type cucu with the fields:

  • API key: starts with sk_test_ (sandbox) or sk_live_ (production); the environment is inferred from the prefix
  • Environment: automatic, testing or production (if it contradicts the key, nothing is sent)
  • Default point of sale (UUID): used when the node does not specify one
  • Company ID (UUID): for branches and certificate status
  • Webhook secret (whsec_…): to verify event signatures
{
"operation": "ensure",
"renewed": false,
"cufd": "BQUFDZ…",
"control_code": "C1D2E3",
"expires_in_minutes": 612
}

The output is stored under the configured key (output_key, default cucu) and the rest of data is kept. On error: error.message, error.type and, where applicable, status, code and siat_code.

{
"credentials_id": "cred-cucu",
"operation": "ensure",
"renew_before_minutes": 60
}
  • “Ensure” only requests a new CUFD if there is none, it is inactive or expires within the given minutes, so it can run often at no cost.
  • A CUFD lasts one day in SIAT. CUCU usually renews it by itself; this node is useful for scheduled tasks or checks.