Skip to content

Add webhook push notifications for transaction and agent events #226

Description

@robertocarlous

Summary

Clients (mobile apps, dashboards) currently have no server-push mechanism for transaction events. A webhook system would let integrators subscribe to events like transaction.confirmed, agent.rebalanced, deposit.received.

Proposed Solution

  • Add WebhookSubscription Prisma model: url, events (array), secret (for HMAC-SHA256 signature), userId
  • Add CRUD endpoints under /api/webhooks
  • Dispatch webhooks from event listener and agent loop post-action
  • Sign payload with X-Neurowealth-Signature header
  • Retry failed deliveries up to 3 times with exponential backoff (leverage existing fetchWithRetry)

Acceptance Criteria

  • POST /api/webhooks creates subscription, returns signing secret once
  • Payload signed with HMAC-SHA256, verifiable by recipient
  • Failed deliveries retried and logged in a WebhookDelivery table
  • Unit tests for signature generation and retry logic
  • OpenAPI spec updated

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programenhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions