Available events
hacienda.estado
It is the only event published in v1. It fires when Hacienda (Costa Rica’s tax authority) resolves a document issued via the API.
When it is fired:
- Document
aceptado→ final positive status; the document can be delivered to the customer. - Document
rechazado→ final negative status; check themensajefield for the reason.
The receiver’s implementation must be tolerant of unknown future events: receiving an unrecognized evento must never cause a failure; simply log it and discard it.
if (evento.evento === 'hacienda.estado') {
procesarEstadoHacienda(evento);
} else {
// Log and discard — do not fail
console.warn('Unknown event:', evento.evento);
}Future events (roadmap)
comprobante.emitido— at the moment of the document’sPOST.comprobante.anulado— when voided viaDELETE.comprobante.error— when the submission to Hacienda technically fails.
Important: These names may change before release. Do not hardcode them yet.