-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Complexity: High (200 points)
Description
Add webhook system to notify external services of escrow state changes via HTTP callbacks.
Requirements and Context
No mechanism for external integrations to receive escrow updates
E-commerce platforms and mobile apps need push notifications of state changes
Foundation for SMS/email notification services
Enables event-driven architecture for future scaling
Suggested Execution
Fork repo, create branch feat/webhook-notifications
Create Webhook entity: url, secret, events[], userId, isActive
Create WebhookModule with:
WebhookService for CRUD and delivery
WebhookController for user webhook management
Create endpoints:
POST /webhooks - register webhook
GET /webhooks - list user's webhooks
DELETE /webhooks/:id - remove webhook
Implement webhook dispatcher that fires on escrow events
Add HMAC signature for webhook payload verification
Test and Commit
Test webhook registration and listing
Mock HTTP calls for delivery testing
Test signature generation/verification
Test retry logic for failed deliveries
Example Commit Message
feat: implement webhook notification system for escrow events
Add webhook registration and delivery system enabling external services
to receive real-time escrow state change notifications via HTTP callbacks.
Guidelines
Implement exponential backoff for failed deliveries
Sign payloads with HMAC-SHA256 using webhook secret
Queue webhooks asynchronously (don't block main flow)
Rate limit webhook registrations per user