PHPackages                             3neti/hyperverge - 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. [API Development](/categories/api)
4. /
5. 3neti/hyperverge

ActiveLibrary[API Development](/categories/api)

3neti/hyperverge
================

Laravel wrapper for HyperVerge APIs (Selfie Liveness, Face Match, Link KYC, Results API).

v1.0.2(5mo ago)01.3k1MITPHPPHP &gt;=8.2

Since Nov 22Pushed 5mo agoCompare

[ Source](https://github.com/3neti/hyperverge)[ Packagist](https://packagist.org/packages/3neti/hyperverge)[ RSS](/packages/3neti-hyperverge/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (15)Versions (4)Used By (1)

HyperVerge Laravel Package
==========================

[](#hyperverge-laravel-package)

A comprehensive Laravel package for HyperVerge KYC APIs with document signing, QR verification, blockchain timestamping, and certificate generation.

Features
--------

[](#features)

✅ **KYC Verification** - Selfie liveness, face match, ID verification ✅ **Face Verification** - Biometric authentication with stored reference selfies ✅ **Document Signing** - PKCS#7 digital signatures with tamper detection ✅ **QR Code Verification** - Instant document verification via QR codes ✅ **Blockchain Timestamping** - Immutable proof on Bitcoin via OpenTimestamps ✅ **Verification Certificates** - Professional PDF certificates with QR codes ✅ **Type-Safe DTOs** - Spatie Laravel Data for type safety ✅ **Laravel Actions** - Flexible, reusable operations

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

[](#installation)

```
composer require lbhurtado/hyperverge
```

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --provider="Hyperverge\HypervergeServiceProvider"
```

Add your HyperVerge credentials to `.env`:

```
HYPERVERGE_BASE_URL=https://api.hyperverge.co
HYPERVERGE_APP_ID=your-app-id
HYPERVERGE_APP_KEY=your-app-key
```

Usage
-----

[](#usage)

### Selfie Liveness

[](#selfie-liveness)

```
use LBHurtado\HyperVerge\Services\SelfieLivenessService;

$service = app(SelfieLivenessService::class);
$result = $service->verify($base64Image);

if ($result->isLive) {
    // Selfie is live
}
```

### Face Match

[](#face-match)

```
use LBHurtado\HyperVerge\Services\FaceMatchService;

$service = app(FaceMatchService::class);
$result = $service->match($referenceImage, $selfieImage);

if ($result->isMatch) {
    echo "Confidence: {$result->confidence}";
}
```

### Link-based KYC

[](#link-based-kyc)

```
use LBHurtado\HyperVerge\Services\LinkKYCService;

$service = app(LinkKYCService::class);
$session = $service->createSession([
    'redirectUrl' => 'https://yourapp.com/callback',
]);
```

### Fetch Results

[](#fetch-results)

```
use LBHurtado\HyperVerge\Services\ResultsService;

$service = app(ResultsService::class);
$result = $service->fetch($sessionId);

echo $result->applicationStatus;
```

Face Verification
-----------------

[](#face-verification)

Biometric authentication using stored reference selfies for login, payments, and more.

### Enroll a Face

[](#enroll-a-face)

```
use LBHurtado\HyperVerge\Traits\HasFaceVerification;

// Add trait to your model
class User extends Model implements HasMedia
{
    use InteractsWithMedia, HasFaceVerification;
}

// Enroll reference selfie
$user->enrollFace(
    selfie: $request->file('selfie'),
    checkLiveness: true,
    metadata: ['enrolled_at' => now(), 'ip' => $request->ip()]
);
```

### Verify a Face

[](#verify-a-face)

```
$result = $user->verifyFace(
    selfie: $request->file('selfie'),
    context: ['action' => 'login', 'ip' => $request->ip()]
);

if ($result->verified) {
    Auth::login($user);
    echo "Match confidence: {$result->matchConfidence}";
} else {
    echo "Failed: {$result->failureReason}";
}
```

### Check Enrollment Status

[](#check-enrollment-status)

```
if ($user->hasReferenceSelfie()) {
    // User can verify by face
}

// Get statistics
$stats = $user->getFaceVerificationStats();
echo "Success rate: {$stats['success_rate']}%";
```

**Full Documentation**: See [Face Verification Guide](docs/FACE_VERIFICATION.md) for:

- Login by face
- Payment authorization
- Document signing
- Access control
- Security best practices
- Troubleshooting

QR Code Verification
--------------------

[](#qr-code-verification)

### Generate QR Code for Verification

[](#generate-qr-code-for-verification)

```
use LBHurtado\HyperVerge\Actions\Document\GenerateVerificationQRCode;

// Generate QR code with verification URL
$qrData = GenerateVerificationQRCode::run(
    url: 'https://yourapp.com/verify/campaign-uuid/transaction-id',
    size: 300,
    margin: 10
);

// Returns:
// [
//     'data_uri' => 'data:image/png;base64,...',  // For embedding in images
//     'file_path' => '/tmp/qr_abc123.png',        // Physical file path
//     'url' => 'https://...',                     // Original URL
//     'size' => 300,                              // QR dimensions
//     'margin' => 10,                             // QR margin
// ]
```

### Add QR Watermark to Signed PDF

[](#add-qr-watermark-to-signed-pdf)

```
use LBHurtado\HyperVerge\Actions\Document\AddQRWatermarkToPDF;

// Add QR code to PDF (bottom-right corner by default)
$watermarkedPdf = AddQRWatermarkToPDF::run(
    pdfPath: $signedPdfPath,
    qrCodePath: $qrData['file_path']
);

// With custom options
$watermarkedPdf = AddQRWatermarkToPDF::run(
    pdfPath: $signedPdfPath,
    qrCodePath: $qrData['file_path'],
    page: -1,              // -1 = last page, 0 = all pages, 1+ = specific page
    position: 'bottom-right',
    size: 100,             // QR size in pixels
    opacity: 100           // 0-100% opacity
);
```

### Generate Verification Certificate

[](#generate-verification-certificate)

```
use LBHurtado\HyperVerge\Actions\Certificate\GenerateVerificationCertificate;

$certificatePath = GenerateVerificationCertificate::run(
    model: $submission,
    transactionId: $transactionId,
    options: [
        'verificationUrl' => route('verify', [$uuid, $transactionId]),
        'metadata' => [
            'campaign' => $campaign->name,
            'campaign_id' => $campaign->id,
        ],
    ]
);
// Certificate automatically includes QR code
```

### Complete Document Signing Workflow

[](#complete-document-signing-workflow)

```
use LBHurtado\HyperVerge\Actions\Document\MarkDocumentWithKYC;

// Signs document, adds QR watermark, stores in media library
$result = MarkDocumentWithKYC::run(
    model: $submission,
    transactionId: $transactionId,
    additionalMetadata: [
        'signer' => $submission->name,
        'purpose' => 'Identity Verification',
    ],
    tile: 1,  // Signature position (1-9 for multi-signer)
    logoPath: public_path('images/logo.png')
);

// Returns:
// [
//     'stamp' => $signatureMark,      // Media object for signature stamp
//     'signed_document' => $signedDoc, // Media object for signed PDF with QR
// ]
```

Configuration
-------------

[](#configuration-1)

### QR Code Settings

[](#qr-code-settings)

```
// config/hyperverge.php

'qr_code' => [
    'enabled' => true,
    'default_size' => 300,
    'margin' => 10,
    'error_correction' => 'H', // L, M, Q, H (7%, 15%, 25%, 30%)
],

'document_signing' => [
    'qr_watermark' => [
        'enabled' => true,
        'position' => 'bottom-right',  // Any 9 positions supported
        'size' => 100,                 // QR size in pixels (~0.33 inches at 300 DPI)
        'page' => -1,                  // -1 = last page, 0 = all, 1+ = specific
        'opacity' => 100,              // 0-100% opacity
    ],
],
```

### Environment Variables

[](#environment-variables)

```
# HyperVerge API
HYPERVERGE_BASE_URL=https://ind.idv.hyperverge.co/v1
HYPERVERGE_APP_ID=your_app_id
HYPERVERGE_APP_KEY=your_app_key
HYPERVERGE_URL_WORKFLOW=onboarding

# QR Code Settings (optional)
HYPERVERGE_QR_ENABLED=true

# Document Signing (optional)
HYPERVERGE_DOCUMENT_SIGNING_ENABLED=true
HYPERVERGE_AUTO_SIGN_ON_APPROVAL=false
```

Verification URL Format
-----------------------

[](#verification-url-format)

All QR codes point to the verification URL:

```
https://yourapp.com/verify/{campaign_uuid}/{transaction_id}

```

**URL Components**:

- `campaign_uuid`: Unique campaign identifier
- `transaction_id`: HyperVerge transaction ID

**What Users See**:

- ✅ Verified identity information (name, DOB, ID type, etc.)
- ✅ Signature stamp with ID card image
- ✅ Signed document download
- ✅ Blockchain timestamp status
- ✅ Shareable QR code
- ✅ Security features checklist

Testing
-------

[](#testing)

### Run All Tests

[](#run-all-tests)

```
cd packages/hyperverge-php
../../vendor/bin/pest
```

### Run Specific Test Suite

[](#run-specific-test-suite)

```
# Unit tests
../../vendor/bin/pest tests/Actions/

# Integration tests
../../vendor/bin/pest tests/Integration/

# Specific test file
../../vendor/bin/pest tests/Actions/GenerateVerificationQRCodeTest.php
```

### Test Coverage

[](#test-coverage)

```
../../vendor/bin/pest --coverage
```

**Current Coverage**: 33 tests across 4 test files

- QR Generation: 4 tests
- QR Watermarking: 12 tests
- Certificate Generation: 6 tests
- Integration Workflows: 11 tests

Troubleshooting
---------------

[](#troubleshooting)

### QR Code Not Appearing

[](#qr-code-not-appearing)

1. **Check if enabled**:

    ```
    config('hyperverge.document_signing.qr_watermark.enabled')
    ```
2. **Verify QR generation**:

    ```
    $qr = GenerateVerificationQRCode::run('https://example.com');
    dd(file_exists($qr['file_path']));
    ```
3. **Check PHP extensions**:

    ```
    php -m | grep -E "gd|imagick"
    ```

### Performance Issues

[](#performance-issues)

- QR generation: &lt; 100ms (normal)
- PDF watermarking: &lt; 2s (normal)
- If slower, check PDF size and page count
- Consider using queue for bulk operations

### QR Not Scannable

[](#qr-not-scannable)

- Ensure QR size is at least 100px
- Check error correction level (use 'H' for best results)
- Verify URL is accessible from mobile devices
- Test with multiple QR scanner apps

Documentation
-------------

[](#documentation)

Detailed documentation available in `docs/` directory:

- **QR\_WATERMARK\_IMPLEMENTATION.md** - Phase 1 implementation guide
- **CERTIFICATE\_QR\_INTEGRATION.md** - Phase 2 certificate features
- **COMPREHENSIVE\_TESTING.md** - Phase 3 testing guide

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

[](#requirements)

- PHP 8.2+
- Laravel 11.0+ or 12.0+
- GD or Imagick extension
- Composer dependencies (auto-installed):
    - `endroid/qr-code` (QR generation)
    - `intervention/image` (Image manipulation)
    - `filippo-toso/pdf-watermarker` (PDF watermarking)
    - `spatie/laravel-data` (Type-safe DTOs)
    - `lorisleiva/laravel-actions` (Action pattern)

License
-------

[](#license)

MIT

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance71

Regular maintenance activity

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Every ~6 days

Total

3

Last Release

165d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/586e1ed70140038e6348728222adbcf68bfc4455b1f94a4f8bcbe57917a63d57?d=identicon)[3neti](/maintainers/3neti)

---

Top Contributors

[![3neti](https://avatars.githubusercontent.com/u/89447696?v=4)](https://github.com/3neti "3neti (4 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/3neti-hyperverge/health.svg)

```
[![Health](https://phpackages.com/badges/3neti-hyperverge/health.svg)](https://phpackages.com/packages/3neti-hyperverge)
```

###  Alternatives

[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1344.8k1](/packages/jasara-php-amzn-selling-partner-api)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[didww/didww-api-3-php-sdk

PHP SDK for DIDWW API 3

1218.2k](/packages/didww-didww-api-3-php-sdk)

PHPackages © 2026

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