Skip to content

feat: add webhook event system for financial events (Bounty #77)#1050

Open
zp6 wants to merge 2 commits into
rohitdash08:mainfrom
zp6:feat/webhook-events
Open

feat: add webhook event system for financial events (Bounty #77)#1050
zp6 wants to merge 2 commits into
rohitdash08:mainfrom
zp6:feat/webhook-events

Conversation

@zp6
Copy link
Copy Markdown

@zp6 zp6 commented May 15, 2026

Webhook Event System

Closes #77

Implementation

  • Type-safe event bus with TypeScript generics
  • Local event handlers with unsubscribe support
  • External webhook delivery with retry logic
  • HMAC secret verification via headers
  • Configurable retry count and delay
  • Comprehensive test suite

Events Supported

  • transaction.created/updated/deleted
  • budget.threshold_reached/exceeded
  • goal.completed
  • report.generated
  • account.connected/disconnected
  • alert.triggered

Usage

const system = new WebhookEventSystem({ retryCount: 3 })

// Local handler
system.on('transaction.created', (event) => {
  console.log(event.data)
})

// External webhook
system.registerWebhook('slack', {
  url: 'https://hooks.slack.com/...',
  secret: 'my-secret',
  events: ['budget.exceeded'],
  active: true,
})

// Emit
await system.emit('transaction.created', { id: '123', amount: 100 })

Wallet: zp6

@zp6 zp6 requested a review from rohitdash08 as a code owner May 15, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Webhook Event System

1 participant