Description
Third-party systems (LMS platforms, employer portals, institutional systems) need to be notified when credentials are issued, verified, or revoked. Implement an outgoing webhook system: subscribers register a URL + secret, and the system delivers signed webhook payloads with retry logic.
Definition of Done
Acceptance Criteria
- Register webhook URL via API → receives events on credential issuance
- Payload signature verifiable using shared secret
- Failed deliveries retried 3 times, then marked as failed
- Admin can view delivery history and manually retry
- System handles 100+ concurrent subscriptions without performance degradation
Files to Modify
- New file:
backend/src/services/webhookService.ts — webhook dispatch logic
- New file:
backend/src/routes/webhooks.ts — admin CRUD routes
- New file:
backend/src/models/WebhookSubscription.ts — Mongoose model
- New file:
backend/src/models/WebhookDelivery.ts — delivery log model
backend/src/utils/schemas.ts — add webhook validation schemas
backend/src/index.ts — register routes
backend/src/events/transactionEvents.js — emit webhook events on credential ops
Description
Third-party systems (LMS platforms, employer portals, institutional systems) need to be notified when credentials are issued, verified, or revoked. Implement an outgoing webhook system: subscribers register a URL + secret, and the system delivers signed webhook payloads with retry logic.
Definition of Done
Acceptance Criteria
Files to Modify
backend/src/services/webhookService.ts— webhook dispatch logicbackend/src/routes/webhooks.ts— admin CRUD routesbackend/src/models/WebhookSubscription.ts— Mongoose modelbackend/src/models/WebhookDelivery.ts— delivery log modelbackend/src/utils/schemas.ts— add webhook validation schemasbackend/src/index.ts— register routesbackend/src/events/transactionEvents.js— emit webhook events on credential ops