Skip to main content
This section documents the outbound webhook layer of horizon-api. Every mutating v3 route publishes a catalogue event, and the system publishes the business facts that happen outside a request (a payment authorized, a contract activated, a plan renewed); subscribers registered through the Webhook module receive a signed POST for the events they chose. For the inbound direction (third parties calling us, e.g. payment providers) see the integration-specific sections.

What this is

A webhook is an HTTPS endpoint you own. When something you care about happens — a record is created, updated or deleted, a payment is authorized, a contract is signed — horizon-api sends a signed notification to that endpoint. The body tells you:
  • what happened — event, for example payment-intent.authorized;
  • to which record — data.document_id, and the record itself in data.object;
  • whose record it is — data.account: the owning account with its type (person or company), its identity document, the type of that document and its country.
Most integrations can act on the body alone. It is still a notification and not the source of truth: when you need the latest state of a record, read it through the REST API with your own credentials.
api_version 2026-11-15 changed the body: data.account is an object instead of an id, data.account_id was removed, data.object and system events were added, and 81 action events were renamed. See the changelog before you upgrade a consumer.

What webhooks do

Deliver a signed POST within seconds of the change, retry transient failures with exponential backoff and expose every attempt in a ledger.

What webhooks do NOT do

Guarantee ordering, guarantee that every system event is published, carry names, emails or card data, or replace the REST API as the source of truth. A missed delivery never corrupts state.

Scope

Requirements for a subscriber endpoint

  • HTTPS only. Plain http:// URLs are rejected except in the local development environment, where the body arrives without the identity document (data.account.dni is null).
  • Publicly reachable host. Loopback, link-local, private ranges (IPv4 and IPv6), cloud metadata addresses and *.internal names are refused when the webhook is created or updated.
  • No redirects. The delivery worker never follows 3xx; a redirect is a terminal error for that attempt.
  • Answer 2xx within 10 seconds. Do the real work asynchronously.
  • Verify the signature before trusting the body and deduplicate on the delivery id, because retries and replays reuse it.
  • Treat the body as personal data. It carries the identity document of the owning account: keep it out of your logs and store only what you need.

How to read this section

1

Architecture

The two publishers (API requests and system events), the two queue stages (webhook-out-route, webhook-out-deliver), how the owner of a record is resolved, the webhook_dispatch ledger and the subscriber-gated publishing rule.
2

Event catalogue

Route events and system events, naming convention, account scope and the generated table of every event.
3

Subscriptions

Creating a webhook, receiving the one-shot secret, choosing events, activating and rotating.
4

Delivery and signature

Headers, the body with the owning account and the resource, and verification code in Node.js and Python.
5

Retries and failures

Outcome matrix, backoff, exhausted, auto-disable and replay.
6

Operations

Catalogue sync, test deliveries, verifying a delivery with the sink, permissions and known limits.
Managing webhooks (create, subscribe, rotate, replay) requires the administrator role in Horizon Enterprise or the equivalent webhook:* permissions on an API token. See the API reference.