hopekelldev / confirmident
Laravel Confirmident API Integration - A Laravel 10+ package for Confirmident.com.ng
v1.0.0
2025-07-17 16:46 UTC
Requires
- php: >=8.1
- guzzlehttp/guzzle: ^7.0
- illuminate/support: ^10.0
README
Laravel Confirmident is a Laravel 10+ package for seamless integration with the Confirmident identity verification API.
It provides a simple Facade-based interface for NIN and identity verification.
✅ Requirements
- PHP >= 8.1
- Laravel >= 10.0
- GuzzleHTTP >= 7.0
📦 Installation
composer require hopekelldev/confirmident
⚙️ Configuration
Publish Configuration File
php artisan vendor:publish --tag=config --provider="HopekellDev\Confirmident\ConfirmidentServiceProvider"
Environment Variables (.env)
Add the following to your .env
file:
# Confirmident API Key from your Confirmident account CONFIRMIDENT_API_KEY=your_api_key_here # Base URL for Confirmident API (default is production endpoint) CONFIRMIDENT_API_BASE_URL=https://api.confirmident.com.ng
🚀 Usage Example
Verify NIN Example
use Confirmident; // Verify a NIN number $response = Confirmident::verifyNIN('12345678901'); if ($response && $response['status'] === 'success') { $data = $response['data']; // Process the verified data } else { // Handle failure or error $errorMessage = $response['message'] ?? 'Verification failed'; }
📋 Available Methods
Method | Description |
---|---|
nin()->searchByNIN($nin) |
Search NIN details by NIN number |
nin()->searchByPhoneNumber($phone) |
Search NIN details by registered phone number |
nin()->searchByDemographicInfo($data) |
Search NIN by demographic information (firstname, lastname, dob, gender) |
bvn()->verification($bvn) |
Verify BVN and retrieve identity details |
📖 Controller Examples
For detailed usage examples and expected API responses, see:
👉 tests/ControllerExample.md
📃 License
Released under the MIT License.
See the LICENSE file for details.
👤 Author
Ezenwa Hopekell
- GitHub: HopekellDev
- Email: hopekelltech@gmail.com
🤝 Contributions & Issues
Feel free to open issues or submit pull requests on GitHub.