Skip to Content
SelloDeveloper docs
API ReferenceWebhooks

Issued line diverges from the CABYS IVA rate

Sent when a document issued under the default (warn-only) posture applied an IVA rate on one or more lines that disagrees with the CABYS code's current catalog rate. The document still issued; this is a nudge to re-sync your reference data. Verify the `Sello-Signature` header over the RAW body before processing; dedupe on `id` (at-least-once delivery).

Header Parameters

Sello-Signature*string

Webhook 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.

Match^t=[0-9]+,v1=[0-9a-f]{64}(,v1=[0-9a-f]{64})*$
Sello-Webhook-Id*string

The 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.

Request Body

application/json
  1. body

document.iva_rate_divergence — the document issued, but one or more lines applied an IVA rate that disagrees with the CABYS code's current catalog rate.

type*"document.iva_rate_divergence"

Every event type the engine delivers to your endpoint. More may be ADDED; answer 2xx to a type you do not handle.

Value in"document.iva_rate_divergence"
id*string

Stable unique event id — your dedupe key.

createdAt*integer

Unix 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?WebhookApiVersion

The 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.

Match^\d{4}-\d{2}-\d{2}$
data*

Response Body

Your endpoint acknowledged the delivery. Any non-2xx (or a timeout) is retried on the schedule WebhookEvent publishes, then dead-lettered.

Example Requests
POST/document.iva_rate_divergence
Request Body
application/json
{  "id": "string",  "type": "document.iva_rate_divergence",  "createdAt": 0,  "data": {    "status": "accepted",    "documentId": "string",    "accountId": "string",    "emisorId": "string",    "clave": "stringstringstringstringstringstringstringstringst",    "catalogVersion": "string",    "divergences": [      {        "line": 0,        "cabys": "string",        "appliedRate": "string",        "catalogRate": "string"      }    ]  }}
Header Parameters
{  "Sello-Signature": "t=1718668800,v1=5f3a9c1b2d4e6f8a0c2e4f6a8c0e2f4a6c8e0a2c4e6f8a0c2e4f6a8c0e2f4a6c",  "Sello-Webhook-Id": "string"}

Document failed — parked without a verdict

Sent when a document is parked without reaching a verdict through the normal path. `data.state` is where it was parked and `data.reason` why: `submission_failed` (state `error`) — the submit job spent its retry budget or took a terminal refusal. It does NOT prove Hacienda lacks the comprobante: a slow submit can still land, and the document is then corrected to `submitted` with no human involved. `verdict_timeout` (state `dead_letter`) — Sello stopped waiting for Hacienda's verdict; the document's fate at Hacienda is UNKNOWN, so contact support before reissuing. `data.recoverable` is `true` exactly when `state` is `error`: it means Sello still permits a transition out of that state (an operator redrive, or the automatic correction above), NOT that a retry will work. `dead_letter` is final. A later `document.accepted` / `document.rejected` for the same `documentId` may follow a `document.failed` with state `error`, and a second failure after a redrive sends a second `document.failed` with a new `id`. A document Sello cannot place in a single account (its emisor belongs to another account) sends NO event — the operator handles it. Verify the `Sello-Signature` header over the RAW body before processing; dedupe on `id` (at-least-once delivery).

A 90-day deferred-IVA sale lapsed with a balance outstanding

Sent once when day 90 of a condición-10 sale (the 90-day deferred-IVA régimen, LIVA art. 27) ends with a balance outstanding, counted in Costa Rica time with the day after FechaEmision as day 1. `data.documentId` and `data.clave` name the sale; `data.outstanding` is the balance left at the lapse. Sello issues no document and computes no IVA at the lapse; what the lapse owes is yours to settle, and a code-11 REP against the sale is still admitted after it. A sale accepted by Hacienda after its day 90 lapses on the next pass. Verify the `Sello-Signature` header over the RAW body before processing; dedupe on `id` (at-least-once delivery).