Initiates a verification process for a specific customer attribute, such as email or phone.
The verification process is closely linked to a specific customer attribute. Each initiation creates a new process, but if the customer attribute is the same, the currentProcesses will be incremented. A new process can only be initiated a limited number of times, as defined by allowableProcesses. If this limit is exceeded, an error will be returned, and the same customer attribute cannot be verified for a certain period of time. After the cooldown period ends, the currentProcesses are reset, and the verification process can be started again.
Only the most recent verification process linked to a specific customer attribute is marked as active, while all previous ones are marked as failed. The process status is determined by the latest verification attempt associated with it.
A verification process may have a predefined expiration time. After this period (if applicable), the process will be automatically marked as expired, and a new one must be started to complete the verification process for the same customer attribute, adhering to the same rules previously described.
The request payload for initiating a verification process.
A promise that resolves to the newly created verification process.
// Example usage:
walletSetupService.initiateDataVerificationProcess(customerDataVerificationRequest)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error initiating verification process.`);
});
Onboard a new customer by providing their details and credentials. This information is used to verify and set up the customer's wallet, ensuring they meet all necessary requirements.
Only users who are not identified as Politically Exposed Persons (PEPs) or sanctioned individuals will have a wallet created. The onboarding process is controlled to ensure that only eligible customers proceed, in accordance with our agreement with partners for compliance and security.
The preferences object contains user-defined settings for data consent and marketing communications. If this object is not included in the request, default values—configured on our end and adjustable based on the user’s country—will be applied automatically. If preferences are provided, it indicates intentional user choices, and these selections must be recorded accordingly.
Once successfully onboarded, the customer can be authenticated through their provided contact methods (e.g., email or SMS).
Before onboarding a customer, the email and mobile number must be verified using WalletSetupService.initiateDataVerificationProcess and WalletSetupService.submitDataVerificationAttempt.
The request payload for onboarding a customer.
A promise that resolves to the newly created customer information.
// Example usage:
walletSetupService.onboardCustomer(customerPersonRequest)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error onboarding customer.`);
});
Submits a verification attempt for a specific customer attribute tied to an already initiated verification process.
Once a verification process for a specific customer attribute is initiated and active (not expired or failed), the user has a limited number of attempts to complete it (e.g., enter the OTP code sent via email), as defined by the allowableAttempts. Each new verification attempt increments the currentAttempts count until it reaches the predefined limit. When the limit is reached, no further verification attempts for the same process are accepted and are automatically denied. There is no cooldown period, and the verification process is marked as failed. To retry the verification, a new verification process must be started, and the user can attempt the verification again.
A unique identifier for the verification process associated with a particular customer attribute.
The request payload for submitting a verification attempt.
A promise that resolves to the newly created verification attempt submission.
// Example usage:
walletSetupService.submitDataVerificationAttempt(verificationId, customerDataVerificationAttemptRequest)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error submitting verification attempt.`);
});
Static
getRetrieves the singleton instance of the WalletSetupService class.
The singleton instance of the WalletSetupService class.
// Usage:
const walletSetupService = WalletSetupService.getInstance();
Service class for managing wallet setup operations.