feat: signed webhooks with retry support#652
Open
sungdark wants to merge 1 commit intorohitdash08:mainfrom
Open
feat: signed webhooks with retry support#652sungdark wants to merge 1 commit intorohitdash08:mainfrom
sungdark wants to merge 1 commit intorohitdash08:mainfrom
Conversation
Implements signed webhook delivery for key events with HMAC-SHA256 signatures, retry support, and comprehensive event documentation. Features: - Signed delivery using HMAC-SHA256 (X-Webhook-Signature header) - Replay attack protection via timestamp validation (5min window) - Automatic retry with exponential backoff (1min, 5min, 15min) - Webhook subscription management API (CRUD) - Event types documented in service docstring Event types: - expense.created - expense.updated - expense.deleted - bill.due - reminder.sent Signed-off-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements signed webhook delivery for key events with HMAC-SHA256 signatures and retry support, addressing issue #77.
Features
Signed Delivery
X-Webhook-SignatureheaderRetry Support
Event Types
expense.created- fired when an expense is createdexpense.updated- fired when an expense is modifiedexpense.deleted- fired when an expense is deletedbill.due- fired when a bill is created (indicating upcoming due)reminder.sent- fired when a reminder is sentAPI Endpoints
/webhooks/webhooks/webhooks/:id/webhooks/:id/webhooks/:id/webhooks/:id/rotate-secret/webhooks/eventsWebhook Payload Format
{ "event": "expense.created", "timestamp": "2026-03-26T14:30:00+00:00", "data": { "id": 1, "amount": 100.00, "currency": "INR", "description": "Lunch", "date": "2026-03-26" } }Signature Verification
Receivers should verify:
X-Webhook-Signaturematchessha256=HMAC(timestamp + "." + body, secret)Payment
Please send $50 via Wise/crypto to my payment details.
Closes #77