PHPackages                             jowusu837/laravelhubtelmerchantaccount - 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. jowusu837/laravelhubtelmerchantaccount

AbandonedLibrary[API Development](/categories/api)

jowusu837/laravelhubtelmerchantaccount
======================================

Hubtel Merchant Account integration for Laravel

1.1.2(8y ago)67942[1 PRs](https://github.com/jowusu837/laravel-hubtel-merchant-account/pulls)MITPHP

Since Sep 24Pushed 8y ago5 watchersCompare

[ Source](https://github.com/jowusu837/laravel-hubtel-merchant-account)[ Packagist](https://packagist.org/packages/jowusu837/laravelhubtelmerchantaccount)[ RSS](/packages/jowusu837-laravelhubtelmerchantaccount/feed)WikiDiscussions master Synced 1mo ago

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

Hubtel Merchant Account integration for Laravel 5
=================================================

[](#hubtel-merchant-account-integration-for-laravel-5)

[![Latest Release on GitHub](https://camo.githubusercontent.com/12cf00e28c2e4947b9bd36e9e05bfaf913e40b9a72fd74f542ad920d4a30647c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6a6f777573753833372f6c61726176656c68756274656c6d65726368616e746163636f756e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jowusu837/laravelhubtelmerchantaccount)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/2010945857bbb92258adb08916e63dd78c9da48c30f5b053f5c968e709b64a77/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6f777573753833372f6c61726176656c68756274656c6d65726368616e746163636f756e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jowusu837/laravelhubtelmerchantaccount)

Based on

About
-----

[](#about)

The `laravel-hubtel-merchant-account` package allows you to accept and process payments using [Hubtel Merchant Account API](https://developers.hubtel.com/documentations/merchant-account-api) directly in your Laravel application.

Features
--------

[](#features)

- Receive mobile money
- Send mobile money
- Check status of transaction
- Online checkout

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

[](#installation)

Require the `jowusu837/laravelhubtelmerchantaccount` package in your `composer.json` and update your dependencies:

```
$ composer require jowusu837/laravelhubtelmerchantaccount
```

If you're using Laravel 5.5, this is all there is to do.

Should you still be on older versions of Laravel, the final steps for you are to add the service provider of the package and alias the package. To do this open your `config/app.php` file.

Add the HubtelMerchantAccount\\ServiceProvider to your `providers` array:

```
Jowusu837\HubtelMerchantAccount\ServiceProvider::class,
```

And add a new line to the `aliases` array:

```
'aliases' => [
      ...
      'HubtelMerchantAccount' => Jowusu837\HubtelMerchantAccount\HubtelMerchantAccountFacade::class,
      ...
 ]
```

Using Online Checkout feature
-----------------------------

[](#using-online-checkout-feature)

Let's say you are using this feature from a controller method, you can do it like so:

```
namespace App\Http\Controllers;

use Jowusu837\HubtelMerchantAccount\OnlineCheckout\Item;
use HubtelMerchantAccount;
use App\Order;
use Illuminate\Http\Request;

class CheckoutController extends Controller
{

  ...

  public function payOnline(Request $request)
    {
        $order = Order::where('session_id', $request->session()->getId())->latest()->first();

        if (!$order) {
            abort(404, 'Invalid order!');
        }

        // Initiate online checkout
        $ocRequest = new \Jowusu837\HubtelMerchantAccount\OnlineCheckout\Request();
        $ocRequest->invoice->description = "Invoice description";
        $ocRequest->invoice->total_amount = $order->total;
        $ocRequest->store->name = "My Shop";
        $ocRequest->store->logo_url = asset('/img/logo.png');
        $ocRequest->store->phone = "0243XXXXXX";
        $ocRequest->store->postal_address = "P. O. Box 123456";
        $ocRequest->store->tagline = "Best online shop ever";
        $ocRequest->store->website_url = env('APP_URL');
        $ocRequest->actions->cancel_url = url('/checkout/done');
        $ocRequest->actions->return_url = url('/checkout/done');

        foreach ($order->items as $item) {

            $invoiceItem = new Item();
            $invoiceItem->name = $item->product_name;
            $invoiceItem->description = "";
            $invoiceItem->quantity = $item->quantity;
            $invoiceItem->unit_price = $item->price;
            $invoiceItem->total_price = $item->price * $item->quantity;

            $ocRequest->invoice->addItem($invoiceItem);
        }

        HubtelMerchantAccount::onlineCheckout($ocRequest);
    }
```

Receive Mobile Money
--------------------

[](#receive-mobile-money)

Here is how you request mobile money payment from say a controller method:

```
namespace App\Http\Controllers;

use HubtelMerchantAccount;
use Jowusu837\HubtelMerchantAccount\MobileMoney\Receive\Request as ReceiveMobileMoneyRequest;

class CheckoutController extends Controller
{

  ...

  public function payOnline(Request $request)
    {
        $request = new ReceiveMobileMoneyRequest();
        $request->Amount = $this->transaction->amount;
        $request->Channel = $this->transaction->channel;
        $request->CustomerMsisdn = $this->transaction->mobile_wallet_number;
        $request->CustomerName = "N/A";
        $request->Description = "General payment";
        $request->PrimaryCallbackURL = "https://my-application.com/handle" . $this->transaction->id;
        $request->SecondaryCallbackURL = "https://my-application.com/handle/" . $this->transaction->id;
        $response = HubtelMerchantAccount::receiveMobileMoney($request);
    }
```

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

[](#configuration)

The defaults are set in `config/hubtelmerchantaccount.php`. Copy this file to your own config directory to modify the values. You can publish the config using this command:

```
$ php artisan vendor:publish --provider="Jowusu837\HubtelMerchantAccount\ServiceProvider"
```

```
return [

    /**
     * Merchant account number
     */
    "account_number" => env('HUBTEL_MERCHANT_ACCOUNT_NUMBER'),

    /**
     * Login credentials for hubtel api
     *
     */
    "api_key" => [
        "client_id" => env('HUBTEL_MERCHANT_ACCOUNT_CLIENT_ID'),
        "client_secret" => env('HUBTEL_MERCHANT_ACCOUNT_CLIENT_SECRET')
    ],

    /**
     * Store details
     */
    "store" => [
        "name" => env('APP_NAME')
    ]
];
```

License
-------

[](#license)

Released under the MIT License, see [LICENSE](LICENSE).

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 83.3% 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 ~43 days

Total

4

Last Release

3021d ago

### Community

Maintainers

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

---

Top Contributors

[![jowusu837](https://avatars.githubusercontent.com/u/1615922?v=4)](https://github.com/jowusu837 "jowusu837 (35 commits)")[![Norris1z](https://avatars.githubusercontent.com/u/18237132?v=4)](https://github.com/Norris1z "Norris1z (7 commits)")

---

Tags

apiecommercehubtelhubtel-paymentlaravelpaymentapilaravelpaymentgatewaymerchantaccounthubtel

### Embed Badge

![Health badge](/badges/jowusu837-laravelhubtelmerchantaccount/health.svg)

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

###  Alternatives

[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)[shipu/php-aamarpay-payment

PHP client for Aamarpay Payment Gateway API

3214.6k](/packages/shipu-php-aamarpay-payment)

PHPackages © 2026

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