Skip to content

feat(webhooks): dispatch settlement outcome events - #312

Merged
K1NGD4VID merged 4 commits into
mergepay:mainfrom
thelight08:fix/issue-280
Sep 2, 2026
Merged

feat(webhooks): dispatch settlement outcome events#312
K1NGD4VID merged 4 commits into
mergepay:mainfrom
thelight08:fix/issue-280

Conversation

@thelight08

Copy link
Copy Markdown
Contributor

Closes #280

Emits settlement completion and failure outcomes from reconciliation so the existing signed webhook dispatcher can notify configured subscribers without blocking worker execution.

@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@thelight08 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@mergekeeper

mergekeeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Needs changes

The PR emits settlement events via emitEvent instead of calling the required webhook service directly, and uses eventType 'settlement.completed' instead of 'settlement.confirmed'.

  • src/services/settlement-reconciliation.ts:184: Issue requires implementing webhook dispatch directly from the background settlement worker using the webhook service (src/services/webhook.ts), but uses emitEvent instead.
  • src/services/settlement-reconciliation.ts:216: Event type 'settlement.completed' does not match the issue requirement 'settlement.confirmed'.

Reviewed commit: ec28853571ee2fa1b466d4b8fac383bc17c85d57.

@mergekeeper mergekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs changes

The PR emits events via a generic event bus instead of implementing and calling the required webhook service and worker dispatch as specified in the issue.

  • src/services/settlement-reconciliation.ts:14: Issue requires implementing src/services/webhook.ts and dispatching webhooks from the background settlement worker, but this PR uses emitEvent instead of calling a webhook dispatch service.

Reviewed commit: bf33037480a64587579cc3802a37727e59f9f141.

@mergekeeper mergekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs changes

The PR emits settlement events via a generic event emitter instead of implementing the required webhook notification service (src/services/webhook.ts), signing mechanism (X-Mergepay-Signature), and worker integration specified in the issue.

  • src/services/settlement-reconciliation.ts:14: The issue requires implementing src/services/webhook.ts to construct, sign, and send HTTP POST webhook payloads directly, but the PR uses emitEvent instead.

Reviewed commit: 36c6a689480ddc875d0794e733cb34d533e2db54.

@mergekeeper mergekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs changes

The PR emits settlement events via emitEvent instead of calling the required webhook service directly, and uses eventType 'settlement.completed' instead of 'settlement.confirmed'.

  • src/services/settlement-reconciliation.ts:184: Issue requires implementing webhook dispatch directly from the background settlement worker using the webhook service (src/services/webhook.ts), but uses emitEvent instead.
  • src/services/settlement-reconciliation.ts:216: Event type 'settlement.completed' does not match the issue requirement 'settlement.confirmed'.

Reviewed commit: ec28853571ee2fa1b466d4b8fac383bc17c85d57.

@thelight08

Copy link
Copy Markdown
Contributor Author

@Cjay-Cyber-2 The webhook fix is pushed and ready for review. Reconciliation now emits group-scoped settlement.completed/settlement.failed events to the signed asynchronous dispatcher. Closes #280.

@mergekeeper

mergekeeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

MergeKeeper review

Scope: in scope for linked issue #280.
Verdict: clean

Webhook dispatching and event integration for settlement outcomes are correctly implemented according to issue #280 requirements.

Reviewed commit: 9f7cf73c8d93f174bd08c30479491dafd215fce9.
CI and merge eligibility are checked separately.

@K1NGD4VID
K1NGD4VID merged commit 0016442 into mergepay:main Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add webhook notification delivery system for on-chain settlement status updates

3 participants