Repository navigation
feat(kyc): implement KYC document submission and verification status … - #659
Open
Tekprecious wants to merge 1 commit into
Open
Tekprecious wants to merge 1 commit into
Tekprecious wants to merge 1 commit into
Conversation
|
@Tekprecious 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…endpoints (#475)
Description
Implements KYC document submission, verification status checking, admin review transitions, and invoice submission gating as requested in Issue #475.
Scope & Key Implementation:
POST /kyc/submit:legalName,registrationNumber,jurisdiction, etc.) and IPFS document CIDs (documentCids,documentType,documentNumber,ipfsDocumentUrl).PENDING.PENDINGorAPPROVED.GET /kyc/status:PENDING,APPROVED,REJECTED) for the authenticated seller/wallet.rejectionReasonwhen status isREJECTED, andnullotherwise.PATCH /kyc/:id/review:x-admin-keyheader or admin JWT) to transition verification status toAPPROVEDorREJECTED.logKYCStatusChangeand dispatches notifications (KYC_APPROVED/KYC_REJECTED)./kyc/:id/reviewand/admin/kyc/:id/review(both with and without/api/v1prefix).REJECTEDStatus:REJECTED.KycHistoryRepository.PENDING, updates document CIDs, and clears the previous rejection reason.POST /invoicesandPOST /api/v1/invoices) verifies seller KYC status.user.kycStatus === 'approved'oruser.isKycVerified === true) with HTTP 403 (KYC_APPROVAL_REQUIRED), unlessskipVerificationis enabled in configuration./kyc/*as well as under/api/v1/kyc/*.Closes #475
Type of Change
Checklist
feat:,fix:,chore:, etc.) — enforced by CI.env, or credentials committed (seeCONTRIBUTING.md)Testing
How to Test
npm test tests/unit/kyc-workflow.test.ts