Skip to main content

Profile Information

Introduction

The Profile service exposes operations for retrieving and managing customer-related information, accounts and balance:

  • Get full customer profile.
  • Get all customer accounts.
  • Get single customer account.
  • Add account in a new currency.

Use the following code to obtain an instance of ProfileService:

val profile = Wallet.getInstance().getProfileService()

Get Profile

Use getProfile method to retrieve the full customer's profile. Additional information can be requested by adding one or more of the ProfileIncludes values to the include parameter.

ProfileIncludes

AndroidiOSDescription
ACCOUNTS.accountsInclude full accounts list for this customer.
RESTRICTIONS.restrictionsInclude customer restrictions and required actions to resolve them.
ADDRESS.addressInclude customer's country, city, address, etc.
CONTACTINFO.contactInfoInclude customer's phone, email, etc.
val include = listOf(ProfileIncludes.CONTACTINFO)

try {
val profileInfo = profile.getProfile(include)
Log.d(TAG, profileInfo.toString())
} catch (exception: Exception) {
Log.d(TAG, exception.toString())
}

Update Profile
Feature in development

Use updateProfile method to update customer's personal information. The result it CustomerInfo with the full personal information about the customer.

note

This API is available only to merchants with standaloneWallet access and walletSetup scope to the config token.

Updating the following customer details might result in customer restriction and require new KYC Verification.

  • firstName, lastName - re-trigger KYC verification
  • address - re-trigger address verification of KYC process

To update the following details, the customer must be non-KYC verified. If the customer is KYC verified, you cannot update these details:

  • birthDate
val updateCustomerRequest = UpdateCustomerRequest(
title = "Mr.",
firstName = "John",
lastName = "Doe",
birthDate = "1991-06-16",
nationality = "US",
occupation = Occupation.ENGINEERING,
vulnerabilities = listOf(Vulnerability.GAMBLING_ADDICTION),
address = UpdateAddressRequest(
stateProvince = "FL",
city = "Tallahassee",
postalCode = "32003",
address1 = "Traditions way 1",
address2 = "Apt. 101"
),
)
val fullCustomerInfo = profile.updateProfile(updateCustomerRequest)

Get Customer Accounts

Use getAccounts method to retrieve all customer accounts. The result is a list of Account objects, containing the balance, currency code, etc.

try {
val accounts = profile.getAccounts()
Log.d(TAG, accounts.toString())
} catch (exception: Exception) {
Log.d(TAG, exception.toString())
}

Get Single Customer Account

Use getSingleAccount method to retrieve a single Account object by ID.

try {
val account = profile.getSingleAccount("1234567890")
Log.d(TAG, account.toString())
} catch (exception: Exception) {
Log.d(TAG, exception.toString())
}

Add Customer Account

Use addAccount method to create a new account for the customer in a provided currency. The result will be the newly created Account object.

val addAccountRequest = AddAccountRequest(currencyCode = "EUR")

try {
val account = profile.addAccount(addAccountRequest)
Log.d(TAG, account.toString())
} catch (exception: Exception) {
Log.d(TAG, exception.toString())
}