PHPackages                             verifinow/laravel - 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. verifinow/laravel

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

verifinow/laravel
=================

Official VerifyNow Laravel package for Age Verification and Identity Verification

v1.0.0(4mo ago)00MITPHPPHP ^8.3

Since Dec 26Pushed 3mo agoCompare

[ Source](https://github.com/ceosantiago/verifinow-laravel)[ Packagist](https://packagist.org/packages/verifinow/laravel)[ Docs](https://github.com/verifinow/laravel)[ RSS](/packages/verifinow-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (2)Used By (0)

VerifyNow Laravel Package
=========================

[](#verifynow-laravel-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6aaf53baab3da8e2ea1a58aca845aa209f8d008eceb3d7169b1e49533aeeb092/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7665726966696e6f772f6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/verifinow/laravel)[![License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Official Laravel package for VerifyNow Age Verification and Identity Verification services.

Features
--------

[](#features)

- 🆔 Identity Verification (IDV) - Document-based verification
- 😊 Facial Recognition - Liveness detection and face matching
- 🔐 Webhook Support - Automatic verification status updates
- 🛡️ Signature Verification - Secure webhook validation
- 📊 Database Models - Track all verifications and attempts
- 🎯 Route Middleware - Protect routes with verification requirements
- 📡 Event System - React to verification completion/failure
- 🧪 Fully Tested - Comprehensive test suite included

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

[](#requirements)

- PHP 8.3+
- Laravel 11.0+
- Guzzle HTTP 7.0+

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

[](#installation)

```
composer require verifinow/laravel
```

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

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --provider="VerifyNow\Laravel\VerifyNowServiceProvider" --tag=verifinow-config
```

Add to your `.env`:

```
VERIFINOW_API_KEY=sk_live_xxxxxxxxxxxxx
VERIFINOW_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxx
VERIFINOW_BASE_URL=https://7on7-backend.verifinow.io
VERIFINOW_TIMEOUT=30
VERIFINOW_REGISTER_ROUTES=true
VERIFINOW_QUEUE_VERIFICATIONS=false
```

Database Setup
--------------

[](#database-setup)

Publish and run migrations:

```
php artisan vendor:publish --provider="VerifyNow\Laravel\VerifyNowServiceProvider" --tag=verifinow-migrations
php artisan migrate
```

Usage
-----

[](#usage)

### Basic Usage with Facades

[](#basic-usage-with-facades)

```
use VerifyNow\Laravel\Facades\VerifyNow;

// Request ID Verification
$response = VerifyNow::requestIDV([
    'user_id' => auth()->id(),
    'country' => 'US',
    'document_type' => 'passport',
]);

// Check verification status
$status = VerifyNow::checkVerificationStatus($response['verification_id']);

// Request facial authentication
$auth = VerifyNow::requestAuthentication([
    'user_id' => auth()->id(),
    'verification_id' => $response['verification_id'],
]);
```

### Using Services

[](#using-services)

```
use VerifyNow\Laravel\Services\IDVService;
use VerifyNow\Laravel\Services\AuthenticationService;

// IDV Service
$idvService = app(IDVService::class);
$result = $idvService->request(['user_id' => 1, 'country' => 'US']);
$isApproved = $idvService->isSuccessful($verification_id);

// Authentication Service
$authService = app(AuthenticationService::class);
$result = $authService->request(['user_id' => 1, 'verification_id' => $vid]);
$confidenceScore = $authService->getConfidenceScore($verification_id);
```

### Add Verification to User Model

[](#add-verification-to-user-model)

```
use VerifyNow\Laravel\Traits\Verifiable;
use VerifyNow\Laravel\Traits\HasVerifications;

class User extends Model
{
    use Verifiable, HasVerifications;
}

// Check if user is verified
$user->isVerified(); // bool

// Get latest verification
$verification = $user->latestVerification();

// Check if requires re-verification
$user->requiresReverification(365); // bool

// Get approval rate
$user->verificationApprovalRate(); // float (0-100)

// Authentication checks
$user->hasCompletedAuthentication(); // bool
$user->lastAuthenticationHasLiveness(); // bool
$user->lastAuthenticationFaceMatched(); // bool
```

### Protect Routes

[](#protect-routes)

```
// Require verification for routes
Route::middleware('verifinow.verified')->group(function () {
    Route::get('/verified-content', function () {
        // Only verified users access
    });
});

// Require specific verification type
Route::middleware('verifinow.verified:idv')->group(function () {
    // Only IDV verified users
});

Route::middleware('verifinow.verified:authentication')->group(function () {
    // Only authenticated users
});
```

### Listen to Events

[](#listen-to-events)

```
use VerifyNow\Laravel\Events\VerificationCompleted;
use VerifyNow\Laravel\Events\VerificationFailed;
use Illuminate\Support\Facades\Event;

Event::listen(VerificationCompleted::class, function ($event) {
    $verification = $event->verification;

    if ($verification->isApproved()) {
        // Notify user verification succeeded
        $user = $verification->user;
        $user->notify(new VerificationApprovedNotification());
    }
});

Event::listen(VerificationFailed::class, function ($event) {
    // Handle verification failure
    Log::error('Verification failed', ['verification' => $event->verification]);
});
```

### Handle Webhooks

[](#handle-webhooks)

The package automatically handles VerifyNow webhooks at `/api/webhooks/verifinow`:

```
// Configure webhook in VerifyNow dashboard:
// Webhook URL: https://yourapp.com/api/webhooks/verifinow
// Events: verification.completed, verification.failed, etc.
```

Testing
-------

[](#testing)

Run the test suite:

```
./vendor/bin/pest
```

Run specific test file:

```
./vendor/bin/pest tests/Feature/WebhookTest.php
```

Generate coverage report:

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

Database Schema
---------------

[](#database-schema)

### verifications Table

[](#verifications-table)

Stores verification requests and results:

- `id` - Primary key
- `user_id` - Associated user
- `verification_id` - VerifyNow verification ID
- `type` - Verification type (idv, authentication, age\_verification)
- `country` - Country code
- `status` - Status (pending, processing, completed, failed)
- `result` - Result (approved, rejected, pending)
- `confidence_score` - Confidence score (0-100)
- `document_type` - Document type used
- `metadata` - Additional data
- `completed_at` - Completion timestamp

### verification\_attempts Table

[](#verification_attempts-table)

Tracks individual verification attempts:

- `id` - Primary key
- `verification_id` - Foreign key to verifications
- `attempt_number` - Attempt sequence number
- `status` - Attempt status
- `response_code` - API response code
- `error_message` - Error details if failed
- `response_data` - Full API response
- `ip_address` - Request IP
- `user_agent` - Request user agent

### user\_authentications Table

[](#user_authentications-table)

Stores facial authentication results:

- `id` - Primary key
- `verification_id` - Foreign key to verifications
- `user_id` - Associated user
- `authentication_id` - VerifyNow authentication ID
- `status` - Status (pending, processing, completed, failed)
- `result` - Result (approved, rejected, pending)
- `confidence_score` - Overall confidence
- `liveness_score` - Liveness detection score
- `face_match_score` - Face matching score
- `device_info` - Device information
- `location_data` - Location data
- `authenticated_at` - Authentication timestamp

Configuration Options
---------------------

[](#configuration-options)

All configuration options can be set via environment variables:

```
# API Configuration
VERIFINOW_API_KEY=          # Your VerifyNow API key (required)
VERIFINOW_BASE_URL=         # VerifyNow API base URL
VERIFINOW_WEBHOOK_SECRET=   # Webhook signature secret (required)
VERIFINOW_TIMEOUT=          # Request timeout in seconds (default: 30)

# Feature Flags
VERIFINOW_REGISTER_ROUTES=  # Auto-register webhook routes (default: true)
VERIFINOW_QUEUE_VERIFICATIONS=  # Queue verification jobs (default: false)
VERIFINOW_CACHE_VERIFICATIONS=  # Cache verification results (default: true)
VERIFINOW_CACHE_TTL=        # Cache TTL in seconds (default: 3600)

# Retry Configuration
VERIFINOW_RETRY_FAILED=     # Retry failed verifications (default: true)
VERIFINOW_MAX_RETRIES=      # Maximum retry attempts (default: 3)

# Logging
VERIFINOW_LOG_CHANNEL=      # Log channel (default: single)
```

Helper Functions
----------------

[](#helper-functions)

Convenient helper functions are available:

```
// Get the main service
verify_now();

// Get the manager
verifinow_manager();

// Request IDV verification
request_idv(['user_id' => 1, 'country' => 'US']);

// Request authentication
request_authentication(['user_id' => 1, 'verification_id' => 'ver_xxx']);

// Check verification status
check_verification_status('ver_xxx');
```

Error Handling
--------------

[](#error-handling)

The package throws specific exceptions for different scenarios:

```
use VerifyNow\Laravel\Exceptions\{
    VerifyNowException,
    UnauthorizedException,
    InvalidRequestException,
    DocumentValidationException,
    LivenessFailedException,
    FaceMismatchException,
};

try {
    VerifyNow::requestIDV($data);
} catch (UnauthorizedException $e) {
    // Invalid API key
} catch (InvalidRequestException $e) {
    // Invalid request data
} catch (DocumentValidationException $e) {
    // Document quality/format issue
} catch (LivenessFailedException $e) {
    // Liveness detection failed
} catch (FaceMismatchException $e) {
    // Face doesn't match document
} catch (VerifyNowException $e) {
    // Generic VerifyNow API error
}
```

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

[](#documentation)

See the `docs/` folder for complete documentation:

- [Integration Guide](../docs/VERIFINOW_API_INTEGRATION.md)
- [Setup Guide](../docs/PACKAGE_SETUP_GUIDE.md)
- [Implementation Examples](../docs/IMPLEMENTATION_EXAMPLES.md)

Support
-------

[](#support)

For issues, questions, or contributions, please visit:

- GitHub:
- VerifyNow:

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

Changelog
---------

[](#changelog)

Please see [CHANGELOG.md](CHANGELOG.md) for details on what has changed recently.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance77

Regular maintenance activity

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

137d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d76f240243a7b40834c07e3eed90b44403b1e05e1ffdbe55e08298329cc35ce7?d=identicon)[SantiagoAristizabal](/maintainers/SantiagoAristizabal)

---

Tags

laravelidentityFacial Recognitionverificationage-verificationidvverifinow

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/verifinow-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/verifinow-laravel/health.svg)](https://phpackages.com/packages/verifinow-laravel)
```

###  Alternatives

[lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

2.3k16.4M48](/packages/lab404-laravel-impersonate)[jeremykenedy/laravel2step

Laravel 2 Step Authentication Package

284107.7k](/packages/jeremykenedy-laravel2step)[rinvex/laravel-authy

Rinvex Authy is a simple wrapper for Authy TOTP, the best rated Two-Factor Authentication service for consumers, simplest 2fa Rest API for developers and a strong authentication platform for the enterprise.

3376.7k1](/packages/rinvex-laravel-authy)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

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