Customer Verification
Introduction
The Customer Verification service enables developers to initiate and manage customer identity verification, often required to meet regulatory and compliance standards such as KYC (Know Your Customer). This service provides operations to start the customer verification process and retrieve the customer's KYC status.
Key Features:
- Initiate a guided flow for customer identity verification, including document checks and biometric verification.
- All customer data collected during the verification process, such as personal information and biometric data, is handled securely, ensuring compliance with industry-standard security protocols and protecting user privacy.
- Check the real-time status of the customer's verification.
Prerequisites
Before integrating the Customer Verification Service, ensure you have:
- A valid Paysafe account with appropriate permissions.
- Set up instructions for Paysafe SDK Android or iOS.
To get started, initialize the CustomerVerificationService
instance in your app as shown below:
- Kotlin
- Swift
import com.paysafe.wallet.android.core.wallet.Wallet
val customerVerificationService = Wallet.getInstance().getCustomerVerificationService()
You need to request camera permission in your app to use the customer verification flow, as it is required for capturing photos of documents or facial recognition during the verification process.
import PaysafeWallet
let customerVerificationService = Wallet.instance.customerVerificationService
You need to add the NSCameraUsageDescription
key to your app’s Info.plist
, as it is required for capturing photos of documents or facial recognition during the customer verification flow.
Customer Verification Workflow Overview
Start Customer Verification:
The startCustomerVerification
method launches the customer verification flow. Once the user completes the process, a VerificationResult
object is returned to the client application with the outcome.
- Kotlin
- Swift
Details about the VerificationResult
object are available here.
val customerVerificationRequest = CustomerVerificationRequest(
merchantRefNum = "oidfjsdkljfh2131",
language = "en"
)
// Use screen for result with launcher to start the customer verification flow
val launcher = registerForActivityResult(OpenCustomerVerification()) { result ->
when (result) {
VerificationResult.COMPLETE -> handleComplete()
VerificationResult.FAILED -> handleFailed()
VerificationResult.CANCELLED -> handleCancelled()
VerificationResult.MISSING_CAMERA_PERMISSION -> handleMissingPermission()
else -> handleOtherError()
}
}
launcher.launch(customerVerificationRequest)
Alternatively you can use startActivityForResult
method:
// Start the verification screen for result
customerVerificationService.startCustomerVerification(this, 100, customerVerificationRequest)
// Then, obtain the verification result in onActivityResult
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == 100 && data != null) {
val result = IntentCompat.getParcelableExtra(data, "EXTRA_CUSTOMER_VERIFICATION_RESULT", VerificationResult::class.java)
when (result) {
VerificationResult.COMPLETE -> handleComplete()
VerificationResult.FAILED -> handleFailed()
VerificationResult.CANCELLED -> handleCancelled()
VerificationResult.MISSING_CAMERA_PERMISSION -> handleMissingPermission()
else -> handleOtherError()
}
}
}
Details about the VerificationResult
object are available here.
let request = Wallet.CustomerVerificationRequest(merchantRefNum: "oidfjsdkljfh2131",
language: "en")
let customerVerificationViewController = customerVerificationService.startCustomerVerification(request: request)
navigationController?.pushViewController(customerVerificationViewController, animated: true)
customerVerificationViewController.completion = { [weak self] verificationResult in
// Handle verification result
self?.navigationController?.popViewController(animated: true)
}
Get KYC Status:
After initiating the customer verification process, verification(KYC) status can be retrieved using the getKycStatus
method. This method returns a KycVerification
object with the customer's current verification status.
- Kotlin
- Swift
Details about the KycVerification
object are available here.
try {
val kycStatus = customerVerificationService.getKycStatus()
} catch (exception: Exception) {
//handle exception
}
Details about the KycVerification
object are available here.
customerVerificationService.getKycStatus(completion: { result in
switch result {
case .success(let kycVerification):
// Display status
case .failure(let error):
// Handle error
}
})