KYC (iOS SDK)
Know Your Customer (KYCKYC Know Your Customer - the identity verification process for consumer identities. This process allows you to seamlessly and securely verify your user's identity. Weavr will ask users to submit the necessary information and documentation so that they can get approved by financial providers.) due diligence is one of the steps required to onboard consumers onto your app. We provide a KYCKYC Know Your Customer - the identity verification process for consumer identities. This process allows you to seamlessly and securely verify your user's identity. Weavr will ask users to submit the necessary information and documentation so that they can get approved by financial providers. component that you can embed in your app. This lets you provide a seamless experience to your user while capturing the required documentation to verify their identity.
Use it for: the identity-verification step of consumer onboarding, after the consumer's profileProfile A template defining the configuration for one type of object - corporate identity, consumer identity, managed account, managed card, transfer, or outgoing wire transfer. When you create one of these objects you reference its Profile ID, which tells Weavr which limits, currencies, supported countries, branding, and fees to apply. Your programme ships with one or more Profile IDs per supported object type. has been created.
Start KYC
Once setup is done you are ready to present the SDK on the screen. See this code example for a quick start.
Customise the look and feel
The look and feel of the KYCKYC Know Your Customer - the identity verification process for consumer identities. This process allows you to seamlessly and securely verify your user's identity. Weavr will ask users to submit the necessary information and documentation so that they can get approved by financial providers. flow can be customised by passing a BrandingConfig as a parameter to the startKyc method. This struct can be constructed like so:
static let branding = BrandingConfig(
textColor: /* Your color here */,
confirmButtonColor: /* Your color here */,
declineButtonColor: /* Your color here */,
confirmTextColor: /* Your color here */,
declineTextColor: /* Your color here */,
disabledConfirmButtonColor: /* Your color here */,
font: /* Your font here */,
backgroundColor: /* Your color here */,
separatorColor: /* Your color here */
)
Based on the colors and fonts provided, the SDK styles the pages in the KYCKYC Know Your Customer - the identity verification process for consumer identities. This process allows you to seamlessly and securely verify your user's identity. Weavr will ask users to submit the necessary information and documentation so that they can get approved by financial providers. flow.
Font matching algorithm
In order to better highlight content, the SDK automatically adapts the font you pass to different weights.
To achieve this, the SDK attempts two different approaches before falling back to using the base font:
- Using a font descriptor with a specific font weight. This works with fonts that are built into the OS. For example, the following snippet changes a font to bold.
let resultingFont = UIFont(descriptor: fontDescriptor.addingAttributes([
.traits: [
UIFontDescriptor.TraitKey.weight: UIFont.Weight.bold
]
]), size: pointSize)
- Using the font weight and font family to load a new font. For instance, if you provide
Arial, the SDK attempts to use its bold counterpart, and attempts to load the fontsArial-BoldandArialRoman-Bold, using the font that successfully loads, or falling back toArialif no match is found.
Example: Add KYC listeners
UXComponents.kyc.startKyc(
viewController: presentingViewController,
kycData: KYCFlowData(
reference: reference,
locale: locale,
brandingConfig: brandingConfig
),
tokenExpirationHandler: { tokenRefreshCallback in
// This handler is called if the session token has expired. You should attempt
// to refresh the token, and inject it again in the `tokenRefreshCallback`.
// If you can't refresh it, you can pass `nil` to tell the SDK the session ended.
let newToken = try? await refreshToken()
tokenRefreshCallback(newToken)
},
eventCallback: { event in
switch event {
case .applicantLoaded(applicantId: let applicantId, actionId: let actionId):
print("Applicant loaded with Id \(applicantId) and action Id \(String(describing: actionId))")
case .stepInitiated(idDocSetType: let idDocSetType):
print("Step with id doc set type \(idDocSetType)")
case .stepCompleted(idDocSetType: let idDocSetType):
print("Step with id doc set type \(idDocSetType)")
case .stepCancelled(idDocSetType: let idDocSetType):
print("Step with id doc set type \(idDocSetType)")
case .verificationCompleted(isApproved: let isApproved):
print("Applicant is " + (isApproved ? "Approved" : "Rejected"))
case .didChangeStatus(status: let status):
print("Changed to status \(status)")
case .didDismissUI:
print("Dismissed the UI")
case .kycError(message: let message, cause: let cause):
print("\(message) - \(cause)")
case .kycInputNotRequired:
print("KYC is not in \"initiated\" state")
@unknown default:
print("Unknown event happened \(event)")
}
}
)