PHPackages                             isaacsichangi/mpesareceiptapi - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. isaacsichangi/mpesareceiptapi

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

isaacsichangi/mpesareceiptapi
=============================

This is a library to generate a pdf receipt for an mpesa transaction whichh can be sent as a link via sms or email to the customer.It can be integrated with the official safaricom/mpesa api

1.0.0(7y ago)2161GPL-3.0PHPPHP &gt;=5.4.0

Since Sep 20Pushed 7y ago1 watchersCompare

[ Source](https://github.com/IsaacSichangi/MPESA-RECEIPT-API)[ Packagist](https://packagist.org/packages/isaacsichangi/mpesareceiptapi)[ RSS](/packages/isaacsichangi-mpesareceiptapi/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

MPESA RECEIPT API PHP
=====================

[](#mpesa-receipt-api-php)

This is a library to generate a pdf receipt for an mpesa transaction which can be sent as a link via sms or email to the customer.It can be integrated with the official safaricom/mpesa api.

REQUIREMENTS
------------

[](#requirements)

- PHP &gt;=5.4.0

### INSTALLATION

[](#installation)

composer require isaacsichangi/mpesareceiptapi:1.0.0

###  HOW TO USE

[](#-how-to-use-)

##### require\_once ('vendor/autoload.php');

[](#require_once-vendorautoloadphp)

//create mpesa receipt object

##### $mpesa = new MpesaReceiptGenerator("Bob Collymore", 3000, "0724XXXXXX", "MPJ54C33P", "Company XYZ", "");

[](#mpesa--new-mpesareceiptgeneratorbob-collymore-3000-0724xxxxxx-mpj54c33p-company-xyz-httpswwwcompanyxyzcom)

##### try {

[](#try-)

 //generate receipt and return path of pdf receipt which can be sent as a link via sms or email message

 [](#--generate-receipt-and-return-path-of-pdf-receipt-which-can-be-sent-as-a-link-via-sms-or-email-message-)

#####  $path = $mpesa-&gt;generateReceipt();

[](#-path--mpesa-generatereceipt)

//view path

#####  echo $path;

[](#-echo-path)

//handle exception

##### } catch (\\Picqer\\Barcode\\Exceptions\\BarcodeException $e) {

[](#-catch-picqerbarcodeexceptionsbarcodeexception-e-)

##### }

[](#-)

### CREDITS

[](#credits)

Isaac Sichangi -

### LIVE DEMO

[](#live-demo)

Send 10ksh to MPESA till number 564305 to see a sample receipt

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

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

2789d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8283380d1c3be590e8e54330bfd5b0c668910862ace029aa2d74fa3365d2a0ba?d=identicon)[IsaacSichangi](/maintainers/IsaacSichangi)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/isaacsichangi-mpesareceiptapi/health.svg)

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

###  Alternatives

[webklex/laravel-pdfmerger

Generic PDF merger for Laravel

1422.6M2](/packages/webklex-laravel-pdfmerger)[jurosh/pdf-merge

PHP PDF Merger

1522.2M5](/packages/jurosh-pdf-merge)[setasign/fpdi-protection

A FPDI compatible version of the FPDF\_Protection script.

324.3M2](/packages/setasign-fpdi-protection)[binarystash/pdf-watermarker

Watermark or stamp PDF documents

8260.6k](/packages/binarystash-pdf-watermarker)[tomsgu/pdf-merger

21473.9k23](/packages/tomsgu-pdf-merger)[filippo-toso/pdf-watermarker

Simple PDF Watermarker with Laravel support

1548.4k1](/packages/filippo-toso-pdf-watermarker)

PHPackages © 2026

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