Skip to content

Add MiCA/EEA KYC support to TransakService - #11672

Draft
matteyusys wants to merge 2 commits into
mainfrom
feat/tram-4400
Draft

matteyusys wants to merge 2 commits into
mainfrom
feat/tram-4400

Conversation

@matteyusys

@matteyusys matteyusys commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Explanation

This PR adds support for Transak's MiCA (Markets in Crypto-Assets) and EEA (European Economic Area) KYC requirements to the native Transak integration in @metamask/ramps-controller.

What changed and why?

Transak has introduced new KYC requirements for EEA users under MiCA regulations. These include:

  1. Consent collection - Users must consent to MiCA terms at a specific timestamp
  2. Source of income disclosure - Users must provide monthly volume, source of funds type, employment status, and country of citizenship
  3. Quote disclaimers - Quotes may include termsIds (e.g., MICA_EEA_BUY, MICA_EEA_SELL) to display MiCA-specific disclaimers

What's included?

New API Methods:

  • submitMicaConsent(consentedAt: string) - Submits MiCA consent with an ISO 8601 timestamp
  • submitSourceOfIncome(monthlyVolume, sourceOfFundsType, employmentStatus, countryOfCitizenship) - Submits source of income details

Type Updates:

  • TransakAdditionalRequirementOption - New type for structured option lists with { name, value } pairs
  • TransakAdditionalRequirement.metadata - Now supports MiCA/EEA fields:
    • sourceOfFundsTypeOptions
    • employmentStatusOptions
    • countryOfCitizenshipOptions
  • TransakBuyQuote.termsIds - Optional array of disclaimer identifiers
  • SubmitMicaConsentRequest and SubmitSourceOfIncomeRequest - Request body types

Breaking Changes:

  • TransakAdditionalRequirement.metadata fields are now optional, and new EEA-specific option fields use TransakAdditionalRequirementOption[] instead of string[]. Clients must check option types when handling additional requirements responses.

Testing

  • Comprehensive unit tests added for:
    • New CONSENT and SOURCE_OF_INCOME form types in getAdditionalRequirements
    • Both new submission methods
    • Quote termsIds handling
  • All existing tests pass
  • Builds successfully
  • Changelog validates

Client Usage

For MetaMask Mobile to consume this:

  1. Install from this branch:

    yarn add @metamask/ramps-controller@https://github.com/MetaMask/core#feat/tram-4400
  2. Or link locally for testing:

    # In core repo
    cd packages/ramps-controller
    yarn link
    
    # In metamask-mobile
    yarn link @metamask/ramps-controller
  3. New public API:

    • TransakService.submitMicaConsent(consentedAt: string): Promise<void>
    • TransakService.submitSourceOfIncome(monthlyVolume: string, sourceOfFundsType: string, employmentStatus: string, countryOfCitizenship: string): Promise<void>
    • TransakAdditionalRequirementOption type
    • SubmitMicaConsentRequest type
    • SubmitSourceOfIncomeRequest type
    • TransakBuyQuote.termsIds?: string[]

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them
Open in Web Open in Cursor 

Moved from #11636 (branch renamed from cursor/mica-eea-kyc-support-7ad1); earlier review history is there.

cursoragent and others added 2 commits November 18, 2026 22:09
- Add submitMicaConsent and submitSourceOfIncome methods
- Add TransakAdditionalRequirementOption type for structured option lists
- Add MiCA/EEA metadata support to TransakAdditionalRequirement
- Add termsIds to TransakBuyQuote for disclaimer identifiers
- Add comprehensive tests for new functionality
- Update CHANGELOG with breaking changes

TRAM-4400

Co-authored-by: Matt I. <[email protected]>
Clean up code comments to match repo's normal level - remove inline
comment that was just labeling self-documenting field names.

Co-authored-by: Matt I. <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

🛑 Files requiring codeowner review

To merge this PR, you'll need to get approvals from the following owners.

@MetaMask/money-movement (4 files)
  • packages/ramps-controller/CHANGELOG.md
  • packages/ramps-controller/src/TransakService-method-action-types.ts
  • packages/ramps-controller/src/TransakService.test.ts
  • packages/ramps-controller/src/TransakService.ts

ℹ️ Files co-owned by @MetaMask/core-platform (expand for more)

[!NOTE]
For convenience in maintaining this repo, @MetaMask/core-platform co-owns
the following files. It is not required to seek approval from
@MetaMask/core-platform to change these files. This section is purely
informational.

  • packages/ramps-controller/CHANGELOG.md

This branch has not been deployed

No deployments
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.

2 participants