Back to docs
Webhooks

Webhook Notifications

Receive real-time HTTP callbacks whenever a conversion event occurs

How Webhooks Work

BankStatementConverter sends POST requests to your configured endpoint

  1. Register your webhook endpoint URL in the dashboard
  2. Choose which conversion events to subscribe to
  3. When an event triggers, we send a signed POST request to your URL
  4. Validate the request signature using your webhook secret
  5. Acknowledge receipt by responding with HTTP 200

Available Events

conversion.completedFired when a statement conversion finishes successfully
conversion.failedFired when a conversion encounters an error
credits.lowFired when remaining credits drop below 5
subscription.updatedFired when your subscription tier changes

Payload Example

Sample webhook payload for conversion.completed

{
  "event": "conversion.completed",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "conversion_id": "conv_abc123",
    "status": "completed",
    "transactions_count": 47,
    "output_format": "csv",
    "output_url": "https://..."
  },
  "signature": "sha256=..."
}

Signature Verification

Confirm the webhook originated from BankStatementConverter

import crypto from 'crypto';

function verifyWebhook(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(JSON.stringify(payload))
    .digest('hex');
  return 'sha256=' + expected === signature;
}