Skip to content

feat(backend): integrate pluggable external KYC providers for SEP-12#294

Open
mofejo1 wants to merge 1 commit intoceejaylaboratory:mainfrom
mofejo1:feat/235-kyc-provider-integration
Open

feat(backend): integrate pluggable external KYC providers for SEP-12#294
mofejo1 wants to merge 1 commit intoceejaylaboratory:mainfrom
mofejo1:feat/235-kyc-provider-integration

Conversation

@mofejo1
Copy link
Copy Markdown

@mofejo1 mofejo1 commented Apr 26, 2026

Closes #235

Summary

  • implement a generic IKycProvider interface for third-party KYC integrations
  • add provider adapters for mock, persona, and shufti
  • add config-driven provider selection via KYC_PROVIDER
  • add webhook signature validation + normalized webhook event parsing in provider layer
  • wire SEP-12 controller to submit through selected provider and persist provider metadata
  • reconcile async webhook updates by provider reference first, then by account fallback
  • add Prisma schema support for provider metadata (provider, providerRef) + migration

Security

  • webhook signatures are validated before processing status updates
  • provider callbacks update only matched KYC records
  • unknown/invalid webhook payloads are rejected

Tests

  • npx jest --coverage=false src/services/kyc-provider.service.test.ts src/api/controllers/sep12.controller.test.ts src/services/kyc.service.test.ts

Notes

  • This PR keeps existing SEP-12 flows intact while enabling anchors to select Persona/Shufti/Mock by configuration.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 26, 2026

@mofejo1 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.

Backend: Add integration with external KYC providers

1 participant