Repository navigation
Add signed seller webhooks with an atomic outbox and durable retries - #587
Open
woahwhattheheck wants to merge 3 commits into
Open
woahwhattheheck wants to merge 3 commits into
woahwhattheheck wants to merge 3 commits into
Conversation
5 tasks
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.
Problem
Sellers currently have to poll the dashboard for invoice changes. Cancellation and expiry also lack payment audit events, so an external accounting or fulfillment system cannot reliably follow the invoice lifecycle.
Change
Adds signed, at-least-once seller webhooks for
invoice.created,invoice.paid,invoice.cancelled,invoice.expired, andpayment.rejected.FOR UPDATE SKIP LOCKED, hold claims through a bounded attempt, and reuse the monitor's backoff with jitter. Retries preserve event IDs; attempt limits produce dead letters and repeated endpoint failures disable delivery.docs/WEBHOOKS.mddocuments deployment, receiver verification, the signature vector, deduplication, and operational limits.Validation
Source:
77b18245e9d694a3b0a09900e36b2ecd3618b1c1. Normal lockfile-based installs; Node 24.21.0 / npm 11.19.0.Webhook/PostgreSQL, frontend, and shared run tested
977da14c. Its sole backend failure was an existing test expecting HTTP 404 from an unavailable Horizon endpoint. The only subsequent change supplies a real local HTTP 404 fixture; it retains the same assertion and changes no production code. The final backend run passes the complete catalog at77b18245.77b18245e9d694a3b0a09900e36b2ecd3618b1c1.Delivery is at least once, so receivers must atomically deduplicate the stable event ID. Memory mode is process-local; durable deployment requires PostgreSQL and a stable server-only encryption key.
Closes #584.
Original-contributor claim and conditional compensation
/claim #584
As the original contributor, I request review and acceptance of this existing implementation for issue #584. I am claiming any eligible GrantFox OSS reward for my contribution under the applicable program terms. If it is accepted, please confirm the approved reward amount (if any), allocation, payment process and expected payment date. The issue's
Maybe Rewardedstatus does not imply an award or payment already exists.