Skip to content
Ledenboek Developers

Webhooks

With a webhook you do not have to ask whether something changed: Ledenboek calls an address of yours as soon as it happens.

Setting up

An administrator adds an endpoint under Settings → Webhooks: a name, an https address and the events you want to receive. Ledenboek then shows the endpoint's secret (whsec_...), which you need to verify messages. The Send test message button sends a ping right away; the result appears in the endpoint's log.

Events

Every message has a type. The names are in English, like the objects in the API.

TypeWhenObject in data.object
member.createdA member was created, for example through a registration.member
member.updatedA member's details changed (name, address, email, status and so on).member
member.cancelledA member cancelled, stopped or died. The status in the object says which.member
invoice.createdAn invoice was created, drafts included.invoice
invoice.paidAn invoice was paid in full.invoice
invoice.overdueAn open invoice is still unpaid after its due date. Once per invoice, the day after the due date.invoice
pingThe test message from the button in the app.ping

The message

A message is a JSON object shaped like the API under /v2. A member's date of birth and bank details are never included, even if a key has the scope for them. Custom fields (custom_fields) are included; a change to those alone does not produce member.updated.

A message
{
  "id": "evt_3f9a1c7e5b2d4a60c8e1f",
  "object": "event",
  "type": "member.created",
  "created_at": "2026-11-27T10:15:00+01:00",
  "data": {
    "object": {
      "object": "member",
      "id": 1234,
      "membership_number": "L042",
      "first_name": "Anna",
      "last_name": "de Vries",
      "email": "anna@example.com",
      "status": "active",
      "member_since": "2026-11-27",
      "created_at": "2026-11-27T10:15:00+01:00",
      "updated_at": "2026-11-27T10:15:00+01:00"
    }
  }
}

Headers

Every request is a POST with Content-Type: application/json and these headers:

Ledenboek-EventThe type, such as member.created.
Ledenboek-DeliveryThe message id (evt_...). It stays the same on a retry, so you can use it to spot duplicates.
Ledenboek-SignatureThe signature, in the form t=1767225600,v1=5257a8....

Verifying the signature

Always verify the signature: otherwise anyone who knows your address can post a message to it. The signature is an HMAC-SHA256 over t, a dot and the unmodified body, keyed with the endpoint's secret, as hexadecimal text. So compute it over the raw body, not over JSON you have already parsed and rebuilt.

  1. Take t and v1 from the header.
  2. Compute the HMAC-SHA256 of <t>.<body> with your secret.
  3. Compare it with v1 in constant time.
  4. Reject messages where t is more than five minutes off, to stop a captured message from being replayed.
# Recompute the signature of a stored request body (body.json)
# with the timestamp from the Ledenboek-Signature header
printf '%s.%s' "$T" "$(cat body.json)" \
  | openssl dgst -sha256 -hmac "$WEBHOOK_SECRET"

Responses and retries

Respond within 10 seconds with a 2xx. Anything else (another status, a timeout, a connection error, a redirect too) counts as failed. Ledenboek then tries four more times: after 1 minute, 5 minutes, 30 minutes and 2 hours. A message can therefore arrive more than once and not always in order; use Ledenboek-Delivery and updated_at to deal with that. The endpoint's log in the app shows the latest deliveries with their status code and is kept for 30 days.

What the address must meet

https only. Addresses that point to localhost or to an internal or private network (such as 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16 and ::1) are refused, even if the name only resolves there at delivery time. Redirects are not followed.

Sample associations

A sample association sends no webhooks, just as it sends no email and no payment requests.