PHPackages                             azaharizaman/nexus-kyc-verification - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. azaharizaman/nexus-kyc-verification

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

azaharizaman/nexus-kyc-verification
===================================

Know Your Customer (KYC) identity verification and customer due diligence with UBO tracking - atomic, framework-agnostic package

v0.1.0-alpha1(2mo ago)021MITPHP ^8.3

Since May 5Compare

[ Source](https://github.com/azaharizaman/nexus-kyc-verification)[ Packagist](https://packagist.org/packages/azaharizaman/nexus-kyc-verification)[ RSS](/packages/azaharizaman-nexus-kyc-verification/feed)WikiDiscussions Synced 3w ago

READMEChangelogDependencies (3)Versions (2)Used By (1)

Nexus\\KycVerification
======================

[](#nexuskycverification)

**Know Your Customer (KYC) Verification Package for Nexus ERP**

A comprehensive, framework-agnostic PHP package for managing KYC verification processes, risk assessment, beneficial ownership tracking, and review scheduling.

Overview
--------

[](#overview)

`Nexus\KycVerification` provides a complete solution for:

- **Party Verification**: Full lifecycle management from initiation to approval/rejection
- **Risk Assessment**: Multi-factor risk scoring with configurable thresholds
- **Beneficial Ownership**: UBO identification, circular ownership detection, PEP tracking
- **Review Scheduling**: Risk-based review frequency with SLA tracking
- **Document Verification**: Multi-document type support with expiry tracking
- **Sanctions &amp; PEP Screening**: Integration points for screening providers

Installation
------------

[](#installation)

```
composer require azaharizaman/nexus-kyc-verification
```

Requirements
------------

[](#requirements)

- PHP 8.3+
- `azaharizaman/nexus-common` package (for shared value objects)
- `psr/log` (for logging interface)

Architecture
------------

[](#architecture)

This package follows the **Atomic Package Pattern**:

- **No external package dependencies** beyond `azaharizaman/nexus-common`
- **Provider interfaces** for external integrations (Party, Document, Screening)
- **Framework-agnostic** - works with Laravel, Symfony, or any PHP framework
- **Orchestrator layer implements** the provider interfaces

### Package Structure

[](#package-structure)

```
src/
├── Contracts/
│   ├── Providers/              # External integration interfaces
│   │   ├── PartyProviderInterface.php
│   │   ├── DocumentVerificationProviderInterface.php
│   │   ├── ScreeningProviderInterface.php
│   │   ├── AddressVerificationProviderInterface.php
│   │   └── AuditLoggerProviderInterface.php
│   ├── KycVerificationManagerInterface.php
│   ├── RiskAssessorInterface.php
│   ├── BeneficialOwnershipTrackerInterface.php
│   ├── ReviewSchedulerInterface.php
│   ├── KycProfileQueryInterface.php
│   └── KycProfilePersistInterface.php
├── Enums/
│   ├── VerificationStatus.php
│   ├── DocumentType.php
│   ├── RiskLevel.php
│   ├── DueDiligenceLevel.php
│   ├── ReviewTrigger.php
│   └── PartyType.php
├── Exceptions/
│   ├── KycVerificationException.php
│   ├── VerificationFailedException.php
│   ├── DocumentExpiredException.php
│   ├── HighRiskPartyException.php
│   ├── InvalidStatusTransitionException.php
│   ├── BeneficialOwnershipException.php
│   └── ReviewOverdueException.php
├── ValueObjects/
│   ├── DocumentVerification.php
│   ├── AddressVerification.php
│   ├── BeneficialOwner.php
│   ├── RiskAssessment.php
│   ├── RiskFactor.php
│   ├── ReviewSchedule.php
│   ├── KycProfile.php
│   └── VerificationResult.php
└── Services/
    ├── KycVerificationManager.php
    ├── RiskAssessor.php
    ├── BeneficialOwnershipTracker.php
    └── ReviewScheduler.php

```

Quick Start
-----------

[](#quick-start)

### 1. Implement Provider Interfaces

[](#1-implement-provider-interfaces)

The orchestrator layer must implement the provider interfaces:

```
use Nexus\KycVerification\Contracts\Providers\PartyProviderInterface;

class PartyProviderAdapter implements PartyProviderInterface
{
    public function __construct(
        private PartyManagerInterface $partyManager
    ) {}

    public function findById(string $partyId): ?array
    {
        $party = $this->partyManager->findById($partyId);
        return $party ? $party->toArray() : null;
    }

    public function getPartyType(string $partyId): ?string
    {
        $party = $this->partyManager->findById($partyId);
        return $party?->getType()->value;
    }

    // ... implement other methods
}
```

### 2. Initialize Services

[](#2-initialize-services)

```
use Nexus\KycVerification\Services\KycVerificationManager;
use Nexus\KycVerification\Services\RiskAssessor;
use Nexus\KycVerification\Services\BeneficialOwnershipTracker;
use Nexus\KycVerification\Services\ReviewScheduler;

// Create service instances with dependencies
$kycManager = new KycVerificationManager(
    profileQuery: $profileQueryRepository,
    profilePersist: $profilePersistRepository,
    riskAssessor: $riskAssessor,
    ownershipTracker: $ownershipTracker,
    reviewScheduler: $reviewScheduler,
    partyProvider: $partyProviderAdapter,
    auditLogger: $auditLoggerAdapter,
    logger: $psrLogger
);
```

### 3. Initiate Verification

[](#3-initiate-verification)

```
use Nexus\KycVerification\Enums\DueDiligenceLevel;

// Initiate KYC verification for a customer
$result = $kycManager->initiateVerification(
    partyId: 'CUST-001',
    dueDiligenceLevel: DueDiligenceLevel::STANDARD
);

if ($result->isPending()) {
    // Verification initiated, collect documents
    echo "Required documents: " . count($result->details['required_documents']);
}
```

### 4. Add Document Verification

[](#4-add-document-verification)

```
use Nexus\KycVerification\ValueObjects\DocumentVerification;
use Nexus\KycVerification\Enums\DocumentType;

$document = DocumentVerification::verified(
    documentId: 'DOC-001',
    documentType: DocumentType::PASSPORT,
    confidence: 0.95,
    expiryDate: new DateTimeImmutable('+5 years')
);

$result = $kycManager->addDocumentVerification('CUST-001', $document);
```

### 5. Complete Verification

[](#5-complete-verification)

```
$result = $kycManager->completeVerification(
    partyId: 'CUST-001',
    verifiedBy: 'OFFICER-001'
);

if ($result->isSuccess()) {
    echo "Customer verified successfully!";
} elseif ($result->isConditional()) {
    echo "Missing requirements: " . implode(', ', $result->conditions);
}
```

Risk Assessment
---------------

[](#risk-assessment)

### Automatic Risk Scoring

[](#automatic-risk-scoring)

```
use Nexus\KycVerification\Services\RiskAssessor;

$assessment = $riskAssessor->assess('CUST-001', [
    'industry' => 'gambling',
    'transaction_volume' => 1_500_000
]);

echo "Risk Level: " . $assessment->riskLevel->value;
echo "Risk Score: " . $assessment->riskScore;

foreach ($assessment->factors as $factor) {
    echo "- {$factor->name}: {$factor->score} points";
}
```

### Risk Levels

[](#risk-levels)

LevelScore RangeReview FrequencyDue DiligenceLOW0-2024 monthsSimplified (SDD)MEDIUM21-4012 monthsStandard (CDD)HIGH41-606 monthsEnhanced (EDD)VERY\_HIGH61-803 monthsEnhanced (EDD)PROHIBITED81-100N/ABlocked### Override Risk Level

[](#override-risk-level)

```
$assessment = $riskAssessor->overrideRiskLevel(
    partyId: 'CUST-001',
    newRiskLevel: RiskLevel::MEDIUM,
    reason: 'Mitigating controls in place',
    approvedBy: 'SENIOR-OFFICER-001'
);
```

Beneficial Ownership
--------------------

[](#beneficial-ownership)

### Register UBOs

[](#register-ubos)

```
use Nexus\KycVerification\ValueObjects\BeneficialOwner;

$owner = new BeneficialOwner(
    ownerId: 'PERSON-001',
    name: 'John Smith',
    ownershipPercentage: 40.0,
    controlRights: ['voting', 'management'],
    isPep: false,
    nationality: 'MY',
    dateOfBirth: new DateTimeImmutable('1980-05-15'),
    isVerified: true,
    verificationDate: new DateTimeImmutable()
);

$ownershipTracker->registerBeneficialOwner('CORP-001', $owner);
```

### Validate Ownership Structure

[](#validate-ownership-structure)

```
$validation = $ownershipTracker->validateOwnershipStructure('CORP-001');

if (!$validation['valid']) {
    foreach ($validation['errors'] as $error) {
        echo "Error: {$error}";
    }
}

// Check circular ownership
if ($ownershipTracker->detectCircularOwnership('CORP-001')) {
    throw new Exception('Circular ownership detected!');
}
```

### Get Ownership Hierarchy

[](#get-ownership-hierarchy)

```
$hierarchy = $ownershipTracker->getOwnershipHierarchy('CORP-001');
// Returns nested tree of ownership structure
```

Review Scheduling
-----------------

[](#review-scheduling)

### Schedule Reviews

[](#schedule-reviews)

```
use Nexus\KycVerification\Enums\ReviewTrigger;

// Auto-schedule based on risk level
$schedule = $reviewScheduler->autoSchedulePeriodicReview('CUST-001');

// Manual schedule with specific trigger
$schedule = $reviewScheduler->scheduleReview(
    partyId: 'CUST-001',
    trigger: ReviewTrigger::ADVERSE_MEDIA_ALERT
);
```

### Process Reviews

[](#process-reviews)

```
// Start review
$schedule = $reviewScheduler->startReview(
    partyId: 'CUST-001',
    reviewId: 'REV-20240115-ABC123',
    reviewerId: 'OFFICER-001'
);

// Complete review
$schedule = $reviewScheduler->completeReview(
    partyId: 'CUST-001',
    reviewId: 'REV-20240115-ABC123',
    outcome: 'approved',
    completedBy: 'OFFICER-001'
);
```

### Monitor Reviews

[](#monitor-reviews)

```
// Get overdue reviews
$overdueReviews = $reviewScheduler->getOverdueReviews();

// Get reviews due within 7 days
$upcomingReviews = $reviewScheduler->getReviewsDueSoon(7);

// Get statistics
$stats = $reviewScheduler->getReviewStatistics();
echo "Overdue: {$stats['overdue']}";
echo "In Progress: {$stats['in_progress']}";
```

Verification Status Workflow
----------------------------

[](#verification-status-workflow)

```
                    ┌─────────────────────────────────────────────────────┐
                    │                                                     │
                    ▼                                                     │
┌─────────┐    ┌─────────┐    ┌──────────────┐    ┌────────────┐        │
│ PENDING │───▶│IN_REVIEW│───▶│PENDING_DOCS  │───▶│  VERIFIED  │────────┤
└─────────┘    └─────────┘    └──────────────┘    └────────────┘        │
     │              │               │                   │                │
     │              │               │                   ▼                │
     │              ▼               ▼          ┌───────────────────┐    │
     │         ┌─────────┐    ┌──────────┐    │PENDING_REVERIFICATION│   │
     │         │REJECTED │    │ EXPIRED  │    └───────────────────┘    │
     │         └─────────┘    └──────────┘              │                │
     │                                                  │                │
     ▼                                                  ▼                │
┌─────────────┐                                  ┌───────────┐          │
│  SUSPENDED  │◀─────────────────────────────────│ CANCELLED │          │
└─────────────┘                                  └───────────┘          │

```

Document Types
--------------

[](#document-types)

The package supports 29 document types across categories:

### Primary Identity Documents

[](#primary-identity-documents)

- Passport, National ID, Driving License

### Secondary Documents

[](#secondary-documents)

- Utility Bill, Bank Statement, Tax Return

### Corporate Documents

[](#corporate-documents)

- Certificate of Incorporation, Memorandum of Association
- Board Resolution, Shareholder Register

### Financial Documents

[](#financial-documents)

- Audited Financial Statements, Bank Reference Letter

Testing
-------

[](#testing)

```
./vendor/bin/phpunit packages/KycVerification/tests
```

License
-------

[](#license)

MIT License. See [LICENSE](LICENSE) for details.

Related Packages
----------------

[](#related-packages)

- **azaharizaman/nexus-aml-compliance** - AML risk assessment and compliance
- **azaharizaman/nexus-sanctions** - Sanctions and PEP screening
- **azaharizaman/nexus-compliance** - General compliance management

---

**Last Updated**: January 2025
**Maintained By**: Nexus Compliance Team

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance84

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

81d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/117408?v=4)[Azahari Zaman](/maintainers/azaharizaman)[@azaharizaman](https://github.com/azaharizaman)

---

Tags

verificationcomplianceidentity verificationeddkycrisk-assessmentcustomer-due-diligenceUBObeneficial-ownerCDD

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/azaharizaman-nexus-kyc-verification/health.svg)

```
[![Health](https://phpackages.com/badges/azaharizaman-nexus-kyc-verification/health.svg)](https://phpackages.com/packages/azaharizaman-nexus-kyc-verification)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k13.0M221](/packages/simplesamlphp-simplesamlphp)[simplesamlphp/saml2

SAML2 PHP library from SimpleSAMLphp

30418.0M43](/packages/simplesamlphp-saml2)[web-auth/webauthn-lib

FIDO2/Webauthn Support For PHP

12510.5M141](/packages/web-auth-webauthn-lib)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

515100.5k3](/packages/web-auth-webauthn-framework)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k16](/packages/tempest-framework)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
