Documentation/Guides/
Decision webhooks
A payment that is not released at once is decided later: by a person, or by your decision policy on the AI triage's recommendation. Set your webhook address and its secret on the API and webhooks screen, and every status change of a payment decision is posted to it. A change Underlayer makes to one of your cards is posted to the same address, signed the same way (card.suspended, card.terminated, card.reinstated; Cards). A delivery leaves within seconds of the change, whoever made it: our API's answer, a person on the screens, your decision policy on an AI triage, or a scheduled check. A retry follows the schedule below.
The changes the API's own answer makes are posted too, so a delivery can repeat what the answer already told you. A payment sent in real time is first set to SCREENING, so it gets decision.screening, then one delivery per status the answer reaches: a payment released at once gets decision.screening and decision.released; one held gets decision.hold, followed by decision.human_review when the same answer passes it to a person or decision.blocked when a rule rejects it. Act on each change once, whichever reaches you first, the answer or the delivery: key what you do by the payment's decision_id and the delivery's event type (X-Underlayer-Event), never by its status alone: a decision.freeze_lifted is a new instruction for a payment that stays BLOCKED (below). A repeated delivery is recognised by X-Underlayer-Idempotency-Key. A delivery is queued only while a webhook address is set: a change made while none is set is never sent, so poll the decision for those.
A delivery
POST <your webhook address>
Content-Type: application/json
X-Underlayer-Event: decision.released
X-Underlayer-Delivery: 00000000-0000-4000-8000-000000000051
X-Underlayer-Idempotency-Key: DEC-2026-000124:3
X-Underlayer-Timestamp: 1756718400
X-Underlayer-Signature: sha256=<hex>
{
"event_type": "decision.released",
"delivery_id": "00000000-0000-4000-8000-000000000051",
"attempt": 1,
"decision_id": "00000000-0000-4000-8000-000000000012",
"decision_ref": "DEC-2026-000124",
"transaction_id": "00000000-0000-4000-8000-000000000011",
"status": "RELEASED",
"rejection_action": null,
"reason": "Released by analyst after review",
"correlation_id": "6f1c2f9e-0000-4000-8000-000000000013",
"occurred_at": "2026-09-01T10:02:17+00:00"
}
Verify it
- Take the raw body exactly as received, before parsing it.
- Compute the HMAC-SHA256, keyed with your webhook secret, of
<X-Underlayer-Timestamp>.<raw body>. - Compare it, in constant time, with the hexadecimal value after
sha256=inX-Underlayer-Signature. - Refuse a delivery whose signature does not match, or whose timestamp is more than five minutes from your clock (older, or later: clocks drift both ways). Each attempt is signed afresh, so a retry is never older than that.
Nothing is sent unsigned: without a secret the delivery is skipped.
A rejected payment
decision.blocked carries rejection_action: REJECT (do not execute the payment; money that came in goes back under your own procedure) or FREEZE (a sanctions match on it was confirmed or not yet cleared: keep the funds where they are, return nothing and handle them under your sanctions procedure). Every other status event has rejection_action: null.
A freeze lifted
A payment rejected with FREEZE stays rejected. If every sanctions alert of the payment is later cleared as a false positive, its freeze is lifted: decision.freeze_lifted is sent once, with status BLOCKED and rejection_action REJECT, and the decision's rejection_action and freeze_lifted_at say the same. From then on, handle the funds as for any rejected payment: money that came in goes back under your own procedure. Nothing is sent while another sanctions alert of the payment is confirmed or still awaiting a decision, and nothing is sent twice.
Answer it
Answer any 2xx within 10 seconds, then do your work. Otherwise (a redirect included) the delivery is retried after 1 minute, 5 minutes, 15 minutes, 1 hour, 4 hours, 12 hours and 24 hours, and marked failed after 8 attempts. A delivery can come twice or out of order: de-duplicate by X-Underlayer-Idempotency-Key, order by occurred_at, and when in doubt read the decision (GET /v1/transactions/{id}/decision).
Your address
An https address of a public host name: no IP address, port, user name or fragment, and no internal or local name. A name that resolves to a private, loopback or other reserved address is not delivered to, and a redirect is not followed.
© 2026 Underlayer, Lithuania. info@underlayer.eu System status Privacy notice