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

ActiveLibrary[API Development](/categories/api)

hopekelldev/laravel-payvessel
=============================

A Laravel package for interacting with Payvessel API

v1.0.0(9mo ago)03MITPHPPHP ^8.0

Since Jul 18Pushed 9mo agoCompare

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

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

Laravel Payvessel
=================

[](#laravel-payvessel)

Laravel Payvessel is a Laravel 10+ package that provides a clean Facade-based integration with the Payvessel API. It allows you to easily create virtual accounts, retrieve account details, and update account BVNs using Laravel's fluent API.

[![Latest Version on Packagist](https://camo.githubusercontent.com/761692d14bc8eeaef47720a35039c9ac2d757381e5e27695e72d34287c7030c0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686f70656b656c6c6465762f6c61726176656c2d70617976657373656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hopekelldev/laravel-payvessel)[![Total Downloads](https://camo.githubusercontent.com/27fe6e7aaf32455e2dfff7a9e12df1f81fa29f3b08af5454ec3378099ab7b0c1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f686f70656b656c6c6465762f6c61726176656c2d70617976657373656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hopekelldev/laravel-payvessel)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a939631565119236bc77c7bd63a473b63b4478d98e29a33d17b30c725a12dba6/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f486f70656b656c6c4465762f6c61726176656c2d70617976657373656c2f6d61696e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/HopekellDev/laravel-payvessel/?branch=main)[![PHP Version](https://camo.githubusercontent.com/c151bceca0e12461c0eaeba90832fafa881ee8aa8d8e4ec5048f23db42cd33a9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344382e302d3737374242342e7376673f7374796c653d666c61742d737175617265)](https://www.php.net/)[![Laravel Version](https://camo.githubusercontent.com/7f985be0a8916514317e4fb7542f4b8ca680fb460eb1e9dfec35d84ce3eedff7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d25334525334431302e302d4646324432302e7376673f7374796c653d666c61742d737175617265)](https://laravel.com/)[![GuzzleHTTP Version](https://camo.githubusercontent.com/540f3b5227c3e3c96cb6622b21487744d8efd1cf63355b40c18737b824a1d77e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f47757a7a6c65485454502d253345253344372e302d3346374539352e7376673f7374796c653d666c61742d737175617265)](https://github.com/guzzle/guzzle)

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

[](#requirements)

- PHP &gt;= 8.0
- Laravel &gt;= 10.0
- Laravel HTTP Client (built-in from Laravel 7+)

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

[](#installation)

Install the package via Composer:

```
composer require hopekelldev/laravel-payvessel
```

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

[](#configuration)

### Publish Configuration File

[](#publish-configuration-file)

Run the following command to publish the configuration file:

```
php artisan vendor:publish --tag=config --provider="HopekellDev\Payvessel\PayvesselServiceProvider"
```

### Environment Variables

[](#environment-variables)

Add the following to your `.env` file:

```
PAYVESSEL_API_KEY=your_api_key
PAYVESSEL_API_SECRET=your_api_secret
PAYVESSEL_BUSINESS_ID=your_business_id
PAYVESSEL_API_URL=https://api.payvessel.com
```

Usage Example
-------------

[](#usage-example)

### Create a Virtual Account

[](#create-a-virtual-account)

```
use Payvessel;

$response = Payvessel::virtualAccounts()->createVirtualAccount([
    'email' => 'johndoe@example.com',
    'name' => 'JOHN DOE',
    'phoneNumber' => '09012345678',
    'bankcode' => ['999991'], // Example: PalmPay code
    'account_type' => 'STATIC',
    'bvn' => '12345678901', // Or 'nin' => '123456789'
]);

if (isset($response['status']) && $response['status'] === 'success') {
    // Success logic
} else {
    // Handle failure
}
```

Available Methods
-----------------

[](#available-methods)

CategoryMethodDescriptionVirtual Accounts`virtualAccounts()->createVirtualAccount($data)`Create a reserved virtual accountVirtual Accounts`virtualAccounts()->getSingleVirtualAccount($account)`Get virtual account detailsVirtual Accounts`virtualAccounts()->accountBVNUpdate($account, $bvn)`Update the BVN of a virtual accountExample Controller Usage
------------------------

[](#example-controller-usage)

```
