Skip to content

feat(buy-crypto): send a KYC-limit refusal to TransFi's verification page - #2600

Merged
mul53 merged 1 commit into
qafrom
claude/transfi-kyc-upgrade
Sep 28, 2026
Merged

mul53 merged 1 commit into
qafrom
claude/transfi-kyc-upgrade

Conversation

@mul53

@mul53 mul53 commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

When an order goes over the limits of the user's current TransFi KYC level, the backend returns STANDARD_KYC_REQUIRED or ENHANCED_KYC_REQUIRED with action: complete_kyc. The error screen answered that with Verify identity, which opened our own identity check (Sumsub or Didit). The user is already verified there, so:

  1. The backend refused a new session (409).
  2. The app reopened the buy-crypto pending step.
  3. That step saw ready and went straight to the amount screen.
  4. The user placed the order again and got the same refusal.

This PR sends these users to TransFi's own verification page instead.

Changes

For the two limit codes only:

  • Title: "Upgrade your verification". The message comes from the backend: "Please upgrade your KYC to make further purchases."
  • Verify identity: calls the new POST /transfi/kyc/upgrade for the level the refusal names (standard or advanced), then opens TransFi's page. It opens the same way as the hosted retry: openBrowserAsync on native, and window.open on web with a fallback button when a popup blocker stops it.
  • Already submitted: if TransFi is already reviewing a submission, the screen shows "Verification in review" and hides the button.
  • Buy a smaller amount: a new second button that goes back to the amount screen, since the limit only caps this purchase.
  • Failures:
    • A transient one (TransFi down, dropped connection) shows an inline message and keeps the button.
    • A refusal with its own verdict (account barred, no TransFi profile) replaces the screen's error.

Every other complete_kyc error, such as a user with no verification, behaves exactly as before.

Testing

  • New tests: components/BuyCrypto/Transfi/__tests__/transfiErrorUpgrade.test.tsx (8 tests) and new cases in lib/__tests__/transfiErrors.test.ts.
  • Full suite: npx jest passes, 134 suites and 1,558 tests.
  • Typecheck: npx tsc --noEmit shows no errors in changed files. It reports 9 errors elsewhere (app/, BankTransfer, CardBanner, the bridge hooks and others), all in files this PR doesn't touch.
  • Lint: ESLint and Prettier are clean on changed files.

Depends on

Backend PR: https://github.com/Solid-Money/solid-backend/pull/1880. It adds POST /transfi/kyc/upgrade and the new copy, and should deploy first.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

…page

On STANDARD_KYC_REQUIRED / ENHANCED_KYC_REQUIRED the error screen offered
"Verify identity", which opened our own identity flow. The user is already
verified there, so it bounced them back to the amount screen and into the same
refusal - a loop with no way out.

The screen now reads "Upgrade your verification" and asks the backend for
TransFi's page for the level the refusal names (POST /transfi/kyc/upgrade),
then opens it. When TransFi already has a submission it shows "Verification in
review" instead, and it offers "Buy a smaller amount", since the limit only
caps this purchase. Every other complete_kyc error behaves as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
solid-app Ignored Ignored Sep 28, 2026 8:48pm UTC
solid-app-staging Ignored Ignored Sep 28, 2026 8:48pm UTC

Request Review

@claude

claude Bot commented Sep 28, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@mul53
mul53 merged commit a54845f into qa Sep 28, 2026
6 checks passed
@mul53
mul53 deleted the claude/transfi-kyc-upgrade branch September 28, 2026 21:43
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