Skip to main content
Webhooks deliver real-time notifications to your application when events occur in the Custody API. Every webhook delivery is signed with HMAC-SHA256 so you can verify authenticity.

Registering a webhook endpoint

Save the secret. It is shown only once. You need it to verify webhook signatures.

Event types

Qustody emits 12 webhook event types across four categories. Use * wildcards in event subscriptions. For example, transaction.* subscribes to all transaction events; screening.* subscribes to every compliance event.
Pass an empty events array (or omit it) to subscribe to all event types.

Webhook payload format

Every delivery includes these headers: The JSON body follows this structure:

HMAC-SHA256 verification

Always verify the X-Webhook-Signature header to confirm the payload came from Qustody and hasn’t been tampered with. The signature is computed as:
Always use constant-time comparison (hmac.compare_digest in Python, crypto.timingSafeEqual in Node.js, hmac.Equal in Go) to prevent timing attacks.

Retry behavior

Failed deliveries are retried with exponential backoff: After all retries are exhausted, the event is moved to the dead-letter queue for manual inspection.

What counts as a failure?

  • HTTP response status outside 200–299
  • Connection timeout (10 seconds)
  • DNS resolution failure
  • TLS handshake failure

Managing endpoints

Best practices

Respond quickly

Return 200 OK immediately and process the event asynchronously. Slow responses trigger retries.

Handle duplicates

Use the id field to deduplicate. Retries may deliver the same event multiple times.

Verify signatures

Always validate HMAC-SHA256 before processing. Reject unsigned or invalid deliveries.

Monitor dead letters

Set up alerting on dead-letter events to catch configuration issues early.