sora-xor / sora-card

Designing a Better World Through Decentralized Technologies
4 stars 1 forks source link

[Tech]: Reworking KYC Status Handling #94

Closed Tieumsan closed 1 year ago

Tieumsan commented 1 year ago

Problem

Various issues exist in the current management of different KYC statuses.

Solution

Implement the correct handling procedures.

Requirements and Sub-tasks

Backend

Client Applications

The KYC workflow should be adjusted according to this diagram.

Web

Mobile

bgodlin commented 1 year ago

Blocked by https://github.com/sora-xor/sora-card/issues/96

2bogd commented 1 year ago

Example of implementation (web): image

Alexey-N-Chernyshov commented 1 year ago

Example of iOS implementation:

var userStatus: SCKYCUserStatus {
    // do not use kycStatus, it may be any state:
    // kycStatus == .Successful or kycStatus == completed or kycStatus == failed
    if verificationStatus == .accepted {
        // KYC verification completed, waiting for IBAN
        return .successful
    }

    if kycStatus == .Completed {
        // KYC docs were sent, waiting for KYC verification
        return .pending
    }

    if kycStatus == .Retry {
        // retry
        return .rejected
    }

    if kycStatus == .Started {
        // KYC wasn't completed, reuse reference_number from KYC
        return .userCanceled
    }

    if kycStatus == .Failed {
        // KYC wasn't completed, reuse reference_number from KYC
        return .userCanceled
    }

    if kycStatus == .Rejected {
        // KYC was rejected, start a new one with a new reference_number
        return .rejected
    }
}