Skip to main content
Version: 0.44.0

Customer Onboarding Process

Customer onboarding is a multi-step process that establishes the customer's identity, provisions their system access, and creates the financial accounts needed for operations. The process involves coordination between the admin panel, the Sumsub KYC provider, the Keycloak identity server, and the deposit module.

Onboarding Flow

Step 1: Customer Creation

An operator creates the customer by providing:

  • Email address (required) - Used for Keycloak login and communication. Must be unique.
  • Telegram ID (optional) - Alternative contact channel.
  • Customer type (required) - Determines the KYC verification workflow (KYC for individuals, KYB for companies) and the accounting treatment for the customer's accounts.

The new customer starts with:

  • KYC verification status: Pending Verification
  • Activity status: Inactive
  • KYC level: Not KYCed

No financial operations are possible until KYC verification completes. The customer does not yet have a deposit account or portal access.

Step 2: KYC Verification

Sumsub Integration

Lana integrates with Sumsub for identity verification. The integration uses two channels:

  1. Outbound API calls - The system calls Sumsub's REST API to create verification links (permalinks) that customers use to submit their identity documents.
  2. Inbound webhooks - Sumsub calls the system's webhook endpoint when verification results are available. All callbacks are processed asynchronously through an inbox queue for reliability.

Verification Levels

The customer type automatically determines which Sumsub verification level is applied:

Customer TypeSumsub LevelVerification Scope
IndividualBasic KYCIdentity documents, selfie, proof of address
All other typesBasic KYBCorporate documents, beneficial ownership, authorized representatives

KYC Status Transitions

StatusDescriptionNext Action
Not StartedKYC link not yet generatedOperator generates Sumsub link
PendingCustomer is completing verification in SumsubWait for Sumsub webhook
ApprovedIdentity verified successfullySystem proceeds to provisioning
RejectedVerification failedReview rejection reasons, optionally retry
Review NeededSumsub flagged for manual reviewReview in Sumsub dashboard

Webhook Callback Processing

When Sumsub completes a verification, it sends a webhook to the system. The callback handler processes several event types:

  • Applicant Created - Confirms that Sumsub has registered the customer. Records the Sumsub applicant ID on the customer record.
  • Applicant Reviewed (Green) - Verification approved. Sets KYC level to Basic and verification status to Verified. Triggers downstream provisioning events.
  • Applicant Reviewed (Red) - Verification rejected. Sets verification status to Rejected. The rejection includes labels and comments explaining the reason.
  • Applicant Pending / Personal Info Changed - Informational events that are logged but do not change customer state.

Each callback is processed exactly once through an idempotency mechanism that deduplicates based on the callback's correlation ID and timestamp.

What Happens on KYC Approval

When a Green review arrives from Sumsub, the following chain of events is triggered:

  1. The customer entity's KYC level is set to Basic and verification status to Verified.
  2. A CustomerKycUpdated event is published to the outbox.
  3. Downstream listeners react to the outbox event:
    • The user onboarding module creates a Keycloak account so the customer can log into the portal.
    • A welcome email with login credentials is sent.
    • A deposit account is created, giving the customer a place to receive funds.

This event-driven architecture means provisioning happens asynchronously. If any step fails (e.g., Keycloak is temporarily unavailable), the job system retries automatically until it succeeds.

Step 3: Automatic Provisioning

When KYC is approved, the system provisions three things:

ResourceModulePurpose
Keycloak userUser OnboardingEnables portal authentication. The user is created in the customer realm.
Welcome emailSMTPDelivers initial credentials to the customer.
Deposit accountDepositCreates the USD deposit account with overdraft prevention. Links to the correct ledger account set based on customer type.

After provisioning completes, the customer can:

  • Log into the customer portal
  • Receive deposits into their account
  • Be considered for credit facility proposals

Admin Panel Operations

Customer List

  • Filter by status (Active, Inactive, Pending)
  • Search by email or public ID
  • Sort by creation date

Available Actions

ActionDescriptionRequired Permission
Create customerNew registrationCUSTOMER_CREATE
View customerQuery informationCUSTOMER_READ
Start KYCBegin verificationCUSTOMER_UPDATE
DeactivateSuspend accountCUSTOMER_UPDATE

Admin Panel Walkthrough: Customer Creation and KYC

This walkthrough reflects the operator flow used in Cypress manuals and aligns with the customer domain lifecycle (create -> verify -> activate).

1) Create and verify customer basics

Step 1. Open the customers list.

Customers list

Step 2. Click Create.

Click create customer

Step 3. The customer creation form opens with the email input field ready.

Customer creation form

Step 4. Enter a unique customer email.

Enter customer email

Step 5. Enter a unique Telegram ID (if used by your process).

Enter telegram id

Step 6. Review details before submission.

Review customer details

Step 7. Verify the confirmation dialog showing the entered customer details.

Verify customer details before submit

Step 8. Click Confirm to create the customer.

Confirm customer creation

Step 9. Confirm the customer detail page and identity fields.

Customer details page

Step 10. Verify the customer appears in list views.

Customer visible in list

2) Start and monitor KYC

The system integrates with Sumsub. Operators generate the verification link, then monitor status changes driven by webhook updates.

Step 11. Open customer KYC section and generate verification link.

Customer KYC detail section

Step 12. Confirm KYC link was created.

KYC link created