Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

felixmuhoro/laravel-mpesa-invoices

Domain:

digital infrastructure

Record type:

software
Creator:
fel
Host:
M-Pesa payment invoices for Laravel # laravel-mpesa-invoices Auto-generates professional PDF invoices for M-Pesa payments and stores/emails them. ## Requirements - PHP 8.1+ - Laravel 10 / 11 / 12 / 13 - `felixmuhoro/laravel-mpesa: ^1.2` - `barryvdh/laravel-dompdf: ^2.0` ## Installation ```bash composer require felixmuhoro/laravel-mpesa-invoices ``` Publish the config file: ```bash php artisan vendor:publish --tag=mpesa-invoices-config ``` Run migrations: ```bash php artisan migrate ``` ## Configuration Set the following in your `.env`: ```dotenv INVOICE_BUSINESS_NAME="Acme Kenya Ltd" INVOICE_BUSINESS_ADDRESS="P.O. Box 12345-00100, Nairobi, Kenya" INVOICE_BUSINESS_PHONE="+254 700 123 456" INVOICE_BUSINESS_EMAIL="billing@acme.co.ke" INVOICE_BUSINESS_WEBSITE="acme.co.ke" INVOICE_KRA_PIN="P051234567X" INVOICE_VAT_NUMBER="V000123456Z" # optional INVOICE_TAX_RATE=16 # VAT percentage (Kenyan standard) INVOICE_TAX_ENABLED=true INVOICE_CURRENCY=KES INVOICE_AUTO_EMAIL=false # auto-email on PaymentSuccessful event INVOICE_STORAGE_DISK=local INVOICE_STORAGE_PATH=invoices ``` ## Usage ### Basic — from a payment array ```php use FelixMuhoro\MpesaInvoices\Invoice; $invoice = Invoice::fromPayment([ 'mpesa_receipt' => 'QHX1234567', 'amount' => 1500.00, 'phone' => '0712345678', 'customer_name' => 'Jane Doe', 'customer_email' => 'jane@example.com', 'description' => 'Premium Subscription', ]); // Download as PDF response return $invoice->download(); // Get HTML string $html = $invoice->toHtml(); // Store PDF to disk + create DB record $record = $invoice->store(); // Send email (with PDF attachment) $invoice->send('jane@example.com'); ``` ### Via Facade ```php use FelixMuhoro\MpesaInvoices\Facades\MpesaInvoice; $invoice = MpesaInvoice::createFromPayment($paymentArray, store: true); $record = MpesaInvoice::findByReceipt('QHX1234567'); $record = MpesaInvoice::findByNumber('INV-202401-0001'); ``` ### With multiple line items ```php $invoice …

Visit

github.com

Languages

Lusengo

Similar

felixmuhoro/laravel-mpesa-notifyfelixmuhoro/laravel-mpesa-webhooksfelixmuhoro/laravel-mpesa-cashierfelixmuhoro/laravel-mpesa-telegramfelixmuhoro/laravel-mpesa-apifelixmuhoro/laravel-mpesa-mock

felixmuhoro/laravel-mpesa-notify

M-Pesa payment notification helpers for Laravel — built on felixmuhoro/laravel-mpesa # felixmuhoro/

felixmuhoro/laravel-mpesa-webhooks

M-Pesa webhook handler for Laravel # laravel-mpesa-webhooks Advanced M-Pesa webhook handling for

felixmuhoro/laravel-mpesa-cashier

Subscription billing via M-Pesa for Laravel

felixmuhoro/laravel-mpesa-telegram

Telegram alerts for M-Pesa payments

felixmuhoro/laravel-mpesa-api

RESTful API for M-Pesa in Laravel

felixmuhoro/laravel-mpesa-mock

Mock M-Pesa API for Laravel testing