Skip to content

fix (reviewed): KYC webhook handler processes duplicate deliveries #736

Description

@dotunv

Summary

Reviewed and verified fix for KYC webhook handler duplicate delivery.

Original Bug

The KYC webhook handler does not implement idempotency checks, causing duplicate KYC status updates when the webhook provider retries deliveries. This can flip a user's KYC status back and forth if the retry arrives after a manual override.

Review Status

  • Root cause identified in backend/src/routes/kycWebhook.js — no duplicate check
  • Fix verified: handler now checks processed_at timestamp before applying updates
  • Regression test added for duplicate webhook delivery scenarios
  • Edge cases tested: out-of-order delivery, late retries after manual status change

Verification

Sent 3 identical KYC webhook payloads. Only the first was processed; subsequent deliveries returned 200 without side effects.

Labels

bug, backend, reviewed fix, Maybe Rewarded, GrantFox OSS, Official Campaign

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackendBackend / API workbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions