Webhooks and signature verification

Get told when your records change, and check that each call really comes from Taxonmark.

Owners and managers add endpoints under Dashboard → Webhooks: up to 10 per organisation, each an HTTPS address on a public network. When you add one, you get its signing secret. It is shown once.

Events

  • deposit.registered, deposit.updated, deposit.failed and deposit.tombstoned, with the record's taxonmark_id, id, status, object_type, title and landing_page;
  • job.completed when a batch job finishes, with job_id, accepted, rejected and total;
  • ping, sent when you press Test on the Webhooks page.

Each delivery

Taxonmark sends a POST request with a JSON body containing id, event, created, registry and data, and these headers:

  • X-TM-Event: the event name;
  • X-TM-Timestamp: the time of sending, in Unix seconds;
  • X-TM-Signature: sha256= followed by the HMAC-SHA256 of the timestamp, a full stop and the raw body, keyed with your signing secret.
$ok = hash_equals('sha256=' . hash_hmac('sha256', $ts . '.' . $raw, $secret), $sig) && abs(time() - (int)$ts) < 300;

Answer within 5 seconds; slower answers are recorded as failed. Redirects are not followed and failed deliveries are not retried, so watch your endpoint's history: each webhook's page lists its last 100 deliveries with the status code, payload and response. You can pause, test or delete a webhook at any time.

Was this helpful? Send feedback