Skip to content

feat(backend-sep12): [SEP-12] Implement webhook dispatch on KYC status change#663

Open
GideonBature wants to merge 1 commit into
ceejaylaboratory:mainfrom
GideonBature:webhook
Open

feat(backend-sep12): [SEP-12] Implement webhook dispatch on KYC status change#663
GideonBature wants to merge 1 commit into
ceejaylaboratory:mainfrom
GideonBature:webhook

Conversation

@GideonBature

Copy link
Copy Markdown
Contributor

Summary

Closes #622.

Dispatches signed outbound webhooks to partner interfaces when a customer’s KYC status changes via the SEP-12 provider callback flow (POST /sep12/webhook).

Changes

  • Extend WebhookService with sendKycStatusChanged() and a kyc.status_changed partner payload
  • Dispatch partner webhooks from Sep12Controller.handleWebhook after a successful status update
  • Skip DB updates and partner dispatch when the provider callback does not change status
  • Reuse existing webhook delivery behavior: signed POST, retry policy, and x-anchorpoint-* headers
  • Add unit and integration coverage for payload shape, delivery, skip conditions, and controller dispatch

Partner webhook payload

{
  "event": "kyc.status_changed",
  "occurredAt": "2026-03-30T10:05:00.000Z",
  "previousStatus": "PENDING",
  "customer": {
    "id": "kyc-1",
    "userId": "user-1",
    "account": "G...",
    "provider": "mock",
    "providerRef": "mock_abc",
    "status": "ACCEPTED",
    "createdAt": "2026-03-30T10:00:00.000Z",
    "updatedAt": "2026-03-30T10:05:00.000Z"
  }
}

@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

@GideonBature 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

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.

[SEP-12] Implement Webhook Dispatch on KYC Status Change

1 participant