Skip to main content
Domavia
Integrations
Latest

Webhooks

Domavia webhooks allow you to receive real-time notifications about events in your account via HTTP

Domavia webhooks allow you to receive real-time notifications about events in your account via HTTP callbacks to your server.

Overview

Webhooks enable event-driven integrations by sending HTTP POST requests to your configured endpoint when specific events occur.

Event Types

  • Financial events: Account connections, transactions, errors
  • Document events: Uploads, AI analysis completion
  • User events: Registration, subscription changes
  • System events: API usage, rate limits

Webhook Signatures

All webhooks include a signature in the X-Domavia-Signature header for verification.

Verifying Signatures

TypeScript
import crypto from 'crypto';
function verifyWebhookSignature(payload: string, signature: string, secret: string): boolean {
const [timestampPart, signaturePart] = signature.split(',');
const timestamp = timestampPart.split('=')[1];
const expectedSignature = signaturePart.split('=')[1];
// Prevent replay attacks
const currentTime = Math.floor(Date.now() / 1000);
if (currentTime - parseInt(timestamp) > 300) {
return false;
}
const signedPayload = `${timestamp}.${payload}`;
const computedSignature = crypto.createHmac('sha256', secret).update(signedPayload).digest('hex');
return crypto.timingSafeEqual(Buffer.from(expectedSignature), Buffer.from(computedSignature));
}

Delivery & Retries

Webhooks retry on failure with exponential backoff: 1m, 5m, 15m, 1h, 4h, 12h (7 attempts total).