Document accepted by Hacienda
Sent when a document reaches the terminal `accepted` verdict (Hacienda `ind-estado = aceptado`). Verify the `Sello-Signature` header over the RAW body before processing; dedupe on `id` (at-least-once delivery).
Sello-Signature*stringWebhook signature: t=<unixSeconds>,v1=<hexHmacSha256>. The v1 value is the hex HMAC-SHA256 of "{t}.{rawRequestBody}" keyed by your endpoint secret. For 24 hours after a secret change the header carries two v1 values, the new secret's first and the previous secret's last (t=<ts>,v1=<new>,v1=<previous>); accept the delivery when any of them matches. Verify over the RAW body (before JSON parsing) in constant time, and reject deliveries whose t is outside your tolerance window (replay defense). The @magiios/sdk verifyWebhook helper implements this exactly.
^t=[0-9]+,v1=[0-9a-f]{64}(,v1=[0-9a-f]{64})*$Sello-Webhook-Id*stringThe event id (also present in the body as id). Dedupe on it — delivery is at-least-once, so the same id can arrive more than once.
application/json- body
document.accepted / document.rejected — the document reached Hacienda's terminal verdict.
type*stringEvery event type the engine delivers to your endpoint. More may be ADDED; answer 2xx to a type you do not handle.
"document.accepted""document.rejected"id*stringStable unique event id — your dedupe key.
createdAt*integerUnix epoch seconds when the event was created. It is NOT the signature timestamp: verify against the t in the Sello-Signature header, which is stamped fresh on each delivery attempt.
apiVersion?WebhookApiVersionThe event schema version the body was created under (#1458), e.g. 2026-06-15. Every event created since #1458 carries it, right after createdAt; a body frozen before then has none. It is fixed at creation, so a retry or a resend carries the same value.
^\d{4}-\d{2}-\d{2}$data*Your endpoint acknowledged the delivery. Any non-2xx (or a timeout) is retried on the schedule WebhookEvent publishes, then dead-lettered.
{ "id": "string", "type": "document.accepted", "createdAt": 0, "data": { "documentId": "string", "accountId": "string", "emisorId": "string", "clave": "stringstringstringstringstringstringstringstringst", "status": "accepted" }}{ "Sello-Signature": "t=1718668800,v1=5f3a9c1b2d4e6f8a0c2e4f6a8c0e2f4a6c8e0a2c4e6f8a0c2e4f6a8c0e2f4a6c", "Sello-Webhook-Id": "string"}Send a stored event again
Queue a NEW delivery of one stored event to the account's current enabled endpoint, with the stored body bytes unchanged (same `id`, `createdAt` and `apiVersion`) and a fresh retry budget. The event selection does not apply. Delivered, dead-lettered, never-delivered and filtered-out events can all be resent. `409` while a customer delivery of the event is still pending or in flight, when no enabled endpoint is registered, or while an Odoo connection holds the endpoint. An open circuit does not refuse; the job waits for it. Requires an `Idempotency-Key`: within 24 hours of acceptance the same key replays the original `202` (even if the endpoint changed since), and the same key for another event is a `409`. A refusal reserves no key. Any request body is ignored. `404` for an event this key may not see.
Document rejected by Hacienda
Sent when a document reaches the terminal `rejected` verdict (Hacienda `ind-estado = rechazado`). Verify the `Sello-Signature` header over the RAW body before processing; dedupe on `id` (at-least-once delivery). `data.mensajeHacienda` carries Hacienda's own `Mensaje` and `DetalleMensaje` when the response held at the verdict parses as a MensajeHacienda, and is absent otherwise. The body is frozen when the event is queued, so every retry carries the same bytes.