PHPackages                             me12free/laravel-mpesa-stkpush-production - 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. [Payment Processing](/categories/payments)
4. /
5. me12free/laravel-mpesa-stkpush-production

ActiveLibrary[Payment Processing](/categories/payments)

me12free/laravel-mpesa-stkpush-production
=========================================

A premium Laravel package for secure, production-ready M-Pesa STK Push integration.

1.0.0(10mo ago)6111MITPHPPHP &gt;=8.0CI failing

Since Jun 21Pushed 10mo agoCompare

[ Source](https://github.com/me12free/laravel-mpesa-stkpush-production)[ Packagist](https://packagist.org/packages/me12free/laravel-mpesa-stkpush-production)[ RSS](/packages/me12free-laravel-mpesa-stkpush-production/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Mpesa Laravel STK Push Premium
==============================

[](#mpesa-laravel-stk-push-premium)

[![Sponsor](https://camo.githubusercontent.com/8a53843c467e4468fc17024760de5475c1f5a4ddfa7990c10bfbd41b39cfbd41/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73706f6e736f722d2545322539442541342d627269676874677265656e)](https://buymeacoffee.com/johnekiru7v)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](LICENSE)[![GitHub stars](https://camo.githubusercontent.com/82bdc775fdd1745571c828270adff79279cabde0ad965c4e8956cbb6145a83d0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6d653132667265652f6c61726176656c2d6d706573612d73746b707573682d70726f64756374696f6e3f7374796c653d736f6369616c)](https://github.com/me12free/laravel-mpesa-stkpush-production/stargazers)[![Buy Me a Coffee](https://camo.githubusercontent.com/3448a1aef18284ed676546f472d80cd036026e9dc87720b8e6a570832672c495/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4275792532304d6525323061253230436f666665652d737570706f72742532306d652d6f72616e67653f6c6f676f3d6275792d6d652d612d636f66666565)](https://buymeacoffee.com/johnekiru7v)

---

**README** | **Tests** | **License: MIT** | [Buy Me a Coffee](https://buymeacoffee.com/johnekiru7v) | [GitHub stars](https://github.com/me12free/laravel-mpesa-stkpush-production/stargazers)

---

A premium Laravel package for secure, production-ready M-Pesa STK Push integration.

100% Free &amp; Open for Contributions
--------------------------------------

[](#100-free--open-for-contributions)

This package is **fully free to use and open for contributions**. There are no plans to introduce a commercial license or restrict usage. You are encouraged to use, modify, and contribute to the package.

Support &amp; Sponsorship
-------------------------

[](#support--sponsorship)

If you find this package useful, you can support development and motivate the author by [buying a coffee](https://buymeacoffee.com/johnekiru7v).

Premium Services
----------------

[](#premium-services)

- **Quick/Advanced Support:** For urgent help, advanced support, or customizations, please [open an issue](https://github.com/me12free/laravel-mpesa-stkpush-production/issues) or sponsor via BuyMeACoffee. You can also email **** for direct support.
- **Customization:** Custom features and integrations are available as a premium service. Contact via issues, BuyMeACoffee, or email **** for details.

Contributions
-------------

[](#contributions)

Contributions are welcome! Please open issues or pull requests to help improve the package.

Monetization &amp; Premium
--------------------------

[](#monetization--premium)

- **Sponsorship:** Support ongoing development via [BuyMeACoffee](https://buymeacoffee.com/johnekiru7v).
- **Powered by Link:** By default, a small "Powered by M-Pesa Premium" link appears on the payment form. You can disable it in the config.

Quick Start
-----------

[](#quick-start)

```
composer require me12free/laravel-mpesa-stkpush-production
php artisan vendor:publish --provider="MpesaPremium\\MpesaPremiumServiceProvider"
```

Set your credentials in `.env` (see below), then use the service or controller to initiate payments.

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

[](#configuration)

Publish the config file and set your production credentials:

```
php artisan vendor:publish --provider="MpesaPremium\\MpesaPremiumServiceProvider"
```

Set these in your `.env`:

```
MPESA_STK_ENDPOINT=https://api.safaricom.co.ke/mpesa/stkpush/v1/processrequest
MPESA_OAUTH_ENDPOINT=https://api.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials
MPESA_CONSUMER_KEY=your_production_key
MPESA_CONSUMER_SECRET=your_production_secret
MPESA_SHORTCODE=your_shortcode
MPESA_PASSKEY=your_passkey
MPESA_CALLBACK_URL=https://yourdomain.com/api/mpesa/callback?secret=your_shared_secret
MPESA_CALLBACK_SECRET=your_shared_secret

```

### Branding/Upgrade Link

[](#brandingupgrade-link)

To remove the "Powered by" or "Upgrade" link, set in your `config/mpesa-stkpush.php`:

```
'branding' => [
    'powered_by' => true, // Show "Powered by" link
    'upgrade_link' => true, // Show "Upgrade to Premium" link
],
```

Premium Add-ons
---------------

[](#premium-add-ons)

- SaaS dashboard integration (coming soon)
- Advanced reporting (coming soon)
- More payment gateways (coming soon)

Demo
----

[](#demo)

[![Demo GIF](https://raw.githubusercontent.com/me12free/laravel-mpesa-stkpush-production/main/docs/demo.gif)](https://raw.githubusercontent.com/me12free/laravel-mpesa-stkpush-production/main/docs/demo.gif)

Security
--------

[](#security)

If you discover any security vulnerability, please open an [issue](https://github.com/me12free/laravel-mpesa-stkpush-production/issues). Do **not** disclose it publicly until it has been addressed.

License
-------

[](#license)

This package is fully free and open for all use. For premium support or customization, please use BuyMeACoffee, open an issue, or email ****.

For premium support, onboarding, or urgent help, open an [issue](https://github.com/me12free/laravel-mpesa-stkpush-production/issues), contact [@me12free on GitHub](https://github.com/me12free), or email ****.

---

📖 Full Integration Guide
------------------------

[](#-full-integration-guide)

For a comprehensive, step-by-step guide to M-Pesa STK Push integration in Laravel (including best practices, troubleshooting, and advanced topics), see:

- [Laravel M-Pesa STK Push Integration Guide](https://github.com/me12free/mpesa-laravel-guide)

---

Security Best Practices
-----------------------

[](#security-best-practices)

- Always use HTTPS in production
- Restrict callbacks to Safaricom IPs
- Use strong, unique secrets
- Enable 2FA for all admin users
- Never log sensitive credentials

Advanced Usage
--------------

[](#advanced-usage)

- Extend the Payment model for your own business logic
- Customize the view for your brand
- Add additional payment gateways as needed
- Use Laravel events to trigger notifications on payment status

Support &amp; Community
-----------------------

[](#support--community)

For premium support, onboarding, or urgent help, contact: **** or [@me12free on GitHub](https://github.com/me12free).

- [Join the discussion](https://github.com/me12free/mpesa-laravel-guide/discussions)
- [Rate &amp; React](https://github.com/me12free/mpesa-laravel-guide)

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

[](#contributing)

This package is fully free and open for contributions! Please open issues or pull requests on GitHub to help improve the package.

For partnership or advanced collaboration inquiries, you can email **** or open an issue on the [GitHub repository](https://github.com/me12free/laravel-mpesa-stkpush-production).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance53

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

Unknown

Total

1

Last Release

326d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ae554ff2708eab11727a9e4d4e4396508d679b680378181d1a19c5b6fd1ee1c?d=identicon)[me12free](/maintainers/me12free)

---

Top Contributors

[![me12free](https://avatars.githubusercontent.com/u/84097667?v=4)](https://github.com/me12free "me12free (11 commits)")

### Embed Badge

![Health badge](/badges/me12free-laravel-mpesa-stkpush-production/health.svg)

```
[![Health](https://phpackages.com/badges/me12free-laravel-mpesa-stkpush-production/health.svg)](https://phpackages.com/packages/me12free-laravel-mpesa-stkpush-production)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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