Skip to content

feat(kyc-controller): generalize UKYC vendor APIs and add status polling - #9908

Open
georgeweiler wants to merge 3 commits into
mainfrom
feat/kyc-controller-generic-ukyc
Open

feat(kyc-controller): generalize UKYC vendor APIs and add status polling#9908
georgeweiler wants to merge 3 commits into
mainfrom
feat/kyc-controller-generic-ukyc

Conversation

@georgeweiler

@georgeweiler georgeweiler commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Parameterizes Universal KYC vendor HTTP (fetchDisclaimers / checkKycRequired / createVendorCustomer) so identity vendors share one client surface instead of Iron-branded public methods (createIronCustomer, fetchIronDisclaimers, etc.).
  • Adds a consents-path flow for non-MoonPay vendors (initialize({ vendor: 'iron' }) → empty-shell customer → consents → SumSub, skipping MoonPay Check/Auth), plus refreshKycStatus / statusChanged and getCustomerIdentity.
  • This is PR-A of the KYC / Money split (TRAM-3862). It is a from-main alternative to stacking on #9852; that PR should not merge as-is.

Test plan

  • yarn workspace @metamask/kyc-controller run test (100% coverage)
  • yarn workspace @metamask/kyc-controller run changelog:validate
  • yarn workspace @metamask/kyc-controller run messenger-action-types:check
  • Confirm MoonPay ramps/card callers still work with default vendor: 'moonpay' (no createIron* on the public surface)
  • Confirm Money can drive the consents path via initialize({ vendor: 'iron', product: 'money' }) and refreshKycStatus

Made with Cursor

Parameterize vendor HTTP and the consents path so KYC stays vendor-neutral, and add refreshKycStatus / statusChanged for user-keyed KYC status.

Co-authored-by: Cursor <cursoragent@cursor.com>
@georgeweiler
georgeweiler requested review from a team as code owners August 19, 2026 02:23
@georgeweiler
georgeweiler deployed to default-branch August 19, 2026 02:23 — with GitHub Actions Active
Co-authored-by: Cursor <cursoragent@cursor.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 276fd29. Configure here.

Comment thread packages/kyc-controller/src/KycController.ts
Comment thread packages/kyc-controller/src/KycController.ts
Comment thread packages/kyc-controller/src/KycController.ts
…tus polling

Stored terms acceptance now records the vendor it was given for, so one vendor's
disclaimer ids can no longer satisfy another vendor's flow. `refreshKycStatus`
no longer restarts polling when a `reset()` landed mid-request, and
`acceptTermsAndStartSession` accepts a zero-argument call again.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant