Skip to main content

The request

Every delivery is an HTTPS POST with a JSON body and these headers:
Body
api_version 2026-11-15 is a breaking change. data.account used to be the account id as a string and is now an object; data.account_id no longer exists (read data.account.document_id); route can be null. The changelog lists what to change.

The owning account

data.account tells you whose record changed without a call back to the API:
  • It is an object whenever the record has an owner. dni and type_dni are null when the account has no identity document. The whole field is null only for records nobody owns: reference data, platform configuration and internal staff records.
  • Match on dni + type + type_dni.internal. One identity document can hold one person account and one company account, so the document alone does not identify an account.
  • dni arrives in one format per document type. A Chilean RUT (CHL_RUT) always comes with dots and hyphen, 17.100.082-3, whatever the way it was typed. Other document types are delivered as stored.
  • One code per document type. Accounts registered with the legacy rut type are delivered as CHL_RUT.
  • country is the country of the account, not of the request.
  • It is read when the delivery is sent. A retry or a replay shows the owner as it is at that moment, which may differ from the first attempt if the account changed in between. If the account no longer exists, the delivery still carries its type, country and type_dni, with dni: null.
The body carries personal data: the identity document of the owner. It is only sent over HTTPS (a plain http:// URL, allowed in development only, receives dni: null), and the platform never stores it in the delivery ledger or writes it to a log. Do the same on your side: verify the signature, keep the body out of your logs and store the document only if you need it. A body never carries a name, an email, a phone number, a card holder or a token.

The resource (data.object)

data.object carries the record the event is about, so most integrations do not need a second call. In the example above it is the payment intent that was authorized: its status, its amount and currency, the authorization code and the response of the payment provider.
  • One shape per resource type. Every event of a resource type delivers the same fields, whichever action produced it, and always includes document_id. A field with no value is null, never missing. The fields are a subset of the columns of the resource, described in the Schemas tab (for example PaymentIntent); references to other records are their ids, and catalogue values such as the currency or a card brand are their stable code. The one exception is the debt of a payment intent, which also arrives in full as debt_detail (below).
  • Only an explicit list of fields is delivered. An object never contains an identity document, a name, an email, a phone number, a card holder, a token, a provider credential, free text or a file URL. A card is delivered as brand, type, last four digits and expiry; a payment carries its authorization code; the URL of a payment link is not delivered.
  • It is null when the resource type has no object yet and on every *.purged event (the record is gone). Check for null before reading it.
  • It is the record a moment after the fact. The object is built once, when the event is routed, and every retry and replay of that delivery carries the same object. If another change follows immediately, the object may already show the later state under the name of the earlier event.

The debt of a payment intent

Every payment-intent event (authorized, failed, canceled, refunded and the route events) carries the debt the payment is for, so a subscriber can act on a payment or a declined charge without reading the debt: Like the rest of the object, debt_detail is the debt a moment after the payment: after payment-intent.authorized it is usually paid (or partial); after payment-intent.failed it is still pending, with last_payment_attempt_status: "failed" and, when the platform will retry the charge, next_automatic_retry_at. The fields were added on 2026-11-23 without a new api_version: accept keys you do not know yet. Resource types that carry an object on 2026-11-15: account, contract, signature, signature-signer, maihue-onboarding, subscription, subscription-product, subscription-product-billing-period, payment-debt, payment-debt-collect, payment-intent, payment-link, payment-method, payment-refund-intent, payment-sales-order, payment-tributary-document, tax-document-charge, tax-document-credit-note, code-coupon-account, code-coupon-agreement, code-subscription-product-invitation, notification, notification-suppression, maihue-street-machine, export-job and payment-debt-upload.
The body identifies the owner and carries the resource, but it is a notification, not the source of truth. Events can arrive out of order, and data.object is the state when the event was routed. When you need the latest state, read the resource through the REST API with your own credentials.

How the signature is computed

  • secret is the whsec_… value returned once by create or rotate-secret.
  • t is the Unix time (seconds) when the worker signed the request.
  • The raw body is the exact byte sequence sent; whitespace or key order changes invalidate the digest.

Verification rules

1

Read the raw body

Capture the body before any JSON middleware parses it. Re-serialising the parsed object changes the bytes.
2

Parse the header

Expect exactly t=<digits>,v1=<64 hex chars>. Reject anything else.
3

Check the timestamp

Reject when |now - t| > 300 seconds. This bounds replay of a captured request; keep your server clock in sync (NTP).
4

Compare in constant time

Recompute the HMAC and compare with a timing-safe function.
5

Deduplicate and acknowledge

Retries and operator replays reuse id. Record processed ids, return 2xx within 10 seconds, and do the real work asynchronously.

Reference implementations

Node.js
These mirror verifyOutboundWebhookSignature in backend/horizon-api/lib/webhook/outbound/webhook-signature.ts, which is also what the built-in test sink uses.

Responding

Details in Retries and failures.
Do not put business logic in front of the signature check. An endpoint that parses the body first and verifies later is trivially spoofable.