POST /v1/tenant/webhooks or on the console’s Webhooks page, which also lists the
latest deliveries. The quickstart walks
through it.
- The endpoint must be an
httpsURL on a public host name:localhostand private addresses are refused. - An empty
event_typessubscribes to every type. - The endpoint’s signing
secretis shown once, in the create answer.
Deliveries
Each delivery is a JSONPOST of {"id", "type", "created_at", "data"}, with
X-Cufea-Signature, X-Cufea-Delivery and X-Cufea-Event headers.
- Signature.
X-Cufea-Signature: t=<unix seconds>,v1=<hex>.v1is the hex HMAC-SHA256 oft, a.and the raw request body ("<t>.<raw body>"), keyed with the endpoint’s secret. Reject atmore than 300 seconds away from your clock, either way. Accept the request when anyv1matches. The quickstart has complete Python and Node.js verifiers. - Answer fast. Answer any
2xxwithin 10 seconds; do the work after answering. - Retries. No answer,
408,429or5xxis retried after 1 min, 5 min, 30 min, 2 h and 6 h (six attempts in all); any other status fails the delivery at once. Each retry is signed again with a fresht. - Deduplicate by event
id. The body’sididentifies the event, the same on every retry;X-Cufea-Deliveryidentifies the delivery. A delivery can arrive more than once. - No ordering guarantee. A retried delivery can arrive after a later event, and deliveries
are sent in parallel. Do not infer the order of events from their arrival: read the
document (
GET /v1/invoices/{document_id}) for its current state.
reference), never customer data.
Besides the DIAN outcomes (invoice.accepted, invoice.rejected, note.accepted,
note.rejected, event.registered), the buyer email emits invoice.delivered,
invoice.delivery_failed, note.delivered and note.delivery_failed (state sent or
failed, and a reason when it failed). An endpoint registered with no event_types
receives every type, these included.