Skip to main content
Version: 0.51.0-rc.18

Customer Management

The Customer Management system is the identity foundation for all financial operations in Lana. Every deposit account, credit facility, and financial transaction ultimately links back to a customer record. The system covers the full customer lifecycle, from initial registration and KYC verification through ongoing relationship management.

Customer Types

Customer type is assigned at creation and determines several downstream behaviors: which KYC verification level is used (individual vs. business), which ledger account sets the customer's deposit accounts belong to, and how accounting entries are categorized in financial reports.

TypeDescriptionKYC LevelAccounting Treatment
IndividualNatural personBasic KYC (identity verification)Individual accounts
Government EntityGovernment organizationBasic KYB (business verification)Government accounts
Private CompanyPrivate corporationBasic KYBBusiness accounts
BankBanking institutionBasic KYBInterbank accounts
Financial InstitutionFinancial services companyBasic KYBInstitutional accounts
Foreign Agency or SubsidiaryForeign agency/subsidiaryBasic KYBForeign accounts
Non-Domiciled CompanyNon-domiciled corporationBasic KYBNon-resident accounts

The distinction between KYC and KYB matters because Sumsub applies different verification workflows for each. Individual customers go through identity document verification (passport, selfie), while all other types go through business verification workflows (corporate documents, beneficial ownership).

Customer Lifecycle

A customer progresses through several states from creation to active operations:

  1. Creation: An operator creates the customer record in the admin panel with email, optional Telegram ID, and customer type. The customer starts with KYC verification Pending.
  2. KYC verification: The operator generates a Sumsub verification link. The customer completes identity verification through Sumsub's interface. Sumsub notifies the system via webhook when verification concludes.
  3. Provisioning: When KYC is approved, the system emits events that trigger downstream provisioning. A Keycloak user account is created so the customer can authenticate, a welcome email is sent with credentials, and a deposit account is created.
  4. Active operations: The customer can now access the customer portal, receive deposits, and apply for credit facilities.

Deposit Account Activity

Deposit account activity is managed automatically by a periodic background job. The system derives each deposit account's last activity date from the latest customer-driven transaction recorded on the account, or falls back to the deposit account creation date when no qualifying transactions exist yet. Internal freeze and unfreeze balance transfers are ignored, so status-management postings do not make a dormant account active again. It then applies configurable thresholds to determine whether that account should be considered active, inactive, or escheatable. By default, those thresholds are 365 days for Inactive and 3650 days for Escheatable, and operators can change them in the admin app through the exposed domain configs deposit-activity-inactive-threshold-days and deposit-activity-escheatable-threshold-days.

StatusConditionEffect
ActiveActivity within the configured inactive threshold (default: 365 days)Account is shown as recently active
InactiveNo activity beyond the inactive threshold and below the escheatable threshold (defaults: 365-3650 days)Account is shown as inactive for operator follow-up
EscheatableNo activity beyond the configured escheatable threshold (default: 3650 days)Account is shown as long-dormant and past the escheatment threshold

This state belongs to the deposit account, not to the customer. Activity is separate from the deposit account's operational status, so an inactive or escheatable activity state does not by itself block deposits or withdrawals.

KYC Verification States

StatusDescriptionNext Action
Pending VerificationInitial state for all new customersGenerate Sumsub verification link
VerifiedIdentity confirmed by SumsubCustomer can access financial products
RejectedVerification failedReview rejection reasons in Sumsub

KYC verification is a one-way gate: once verified, a customer remains verified. If verification is rejected, the operator can review the rejection reasons in the Sumsub dashboard and potentially request a new verification attempt.

When KYC verification requirements are enabled in the system configuration, a customer must be verified before a deposit account can be created or a credit facility can be initiated. This is a configurable policy that the bank can enable or disable.

Closing a Customer

An operator can close a customer account through the admin panel. Closing is a permanent, irreversible action that requires all of the following preconditions to be met:

  • All credit facilities must be in Closed status
  • All credit facility proposals must be in a terminal state (Denied, Approved, or CustomerDenied)
  • No pending credit facilities awaiting collateralization
  • All deposit accounts must be closed
  • No pending withdrawals on any deposit account

When a customer is closed, the system disables the associated Keycloak user account, preventing further authentication to the customer portal.

System Components

ComponentModulePurpose
Customer Managementcore-customerCustomer entity, profiles, and KYC state
KYC Processingcore-customer (kyc)Sumsub API integration, webhook callback handling
Document Storagecore-document-storageFile upload, cloud storage, download link generation
User Onboardinglana-user-onboardingKeycloak user provisioning on customer creation events

Integration with Other Modules

The customer record is referenced by virtually every other module in the system:

  • Deposits: Each customer has a deposit account (created automatically after KYC approval). The customer type determines which ledger account set the deposit account belongs to.
  • Credit: Credit facility proposals are linked to a customer. KYC verification can be required before disbursals are permitted.
  • Accounting: Customer type drives the chart-of-accounts placement for both deposit liabilities and credit receivables.
  • Governance: Approval processes for withdrawals and credit operations reference the customer indirectly through the associated entities.