Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Mpesa Laravel Package

itsmurumba/laravel-mpesa

A Laravel package for integrating Safaricom M-Pesa into your applications. It handles STK Push, C2B and B2C payments, transaction status queries, and callback processing behind a clean, configurable API so you can accept and send mobile money in minutes.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Market entry / feature launch: whether to ship M-Pesa as a first-class payment method in a Laravel product — the gating decision for launching in Kenya and much of East Africa.
  • Checkout design: STK Push (Lipa na M-Pesa Online) enables "enter phone number → approve prompt on device" flows for one-off purchases, subscriptions, and wallet top-ups, with far less friction than manual paybill instructions.
  • Money-flow scoping: C2B (customer paybill/till collections) vs B2C (payouts, refunds, disbursements) are different products with different compliance burdens; deciding which flows are in scope before engineering starts is a PM call this package makes cheap to prototype.
  • Build vs buy: Daraja integration is well-documented but operationally fiddly — OAuth token lifecycle, callback URLs, sandbox vs production switching, transaction status polling. This package compresses a multi-week integration into days, freeing roadmap capacity for the product surface around payments.
  • Roadmap sequencing: paywalls, subscription billing, invoicing, refunds, and payout automation all sit downstream of this integration. It is an enabler, not a differentiator — so it should be scheduled as infrastructure, not as a headline feature.
  • Version strategy (new): a major version bump into beta is itself a planning input. Decide now whether the payments epic targets the stable v1 line or waits for v2 GA; that choice affects the spike's scope and the migration budget you carry into the next quarter.
  • Ops model decisions: reconciliation, idempotency, retry policy, and failed-payment UX are product requirements the package does not solve. Budget PM time for the ledger and support tooling alongside the integration.
  • Risk framing: vendor concentration on Safaricom is a business risk, not a technical one. This package reduces implementation risk but not commercial dependency — keep that distinction explicit in planning.

When to Consider This Package

Adopt when:

  • The stack is Laravel 5–12 and the team wants a native, config-driven integration rather than hand-rolled Guzzle calls against Daraja.
  • Kenya/East Africa is live or on the near-term roadmap, and speed to first transaction matters more than depth of customization.
  • You need STK Push and/or C2B/B2C with sane defaults: env-based credentials, sandbox/production toggle, callback handling.
  • Engineering is small and there is no dedicated payments specialist — a maintained wrapper beats an in-house build you must own forever.
  • MIT licensing is acceptable (no procurement, forkable if the maintainer goes quiet).
  • You pin to the latest stable v1.x release line. That is the version with a settled API surface and the one to put in front of a finance-adjacent flow.

Look elsewhere when:

  • The stack is not Laravel — use a language-native SDK or a hosted aggregator.
  • You need multi-provider abstraction (Stripe + M-Pesa + Flutterwave + bank rails). A single-rail package won't give you a unified payment interface; use an aggregator (Flutterwave, Paystack, Pesapal) or build an internal gateway contract.
  • You require vendor SLA, commercial support, or a security-reviewed dependency. At 20 stars and a single maintainer, treat this as a library you must be prepared to fork and patch. Pin the version and review release notes before upgrading.
  • You are tempted by v2.0.0-beta.1. A beta major version is a pre-release published from develop; the release notes for it cover only CI packaging. There is no published migration guide, no documented API deltas, and no stability commitment. Do not put a beta in a money path. Treat v2 as "watch and trial in sandbox," not "adopt."
  • Your needs extend past Daraja's API surface — reconciliation reporting, dispute management, and settlement reporting are yours to build regardless.
  • Volume and failure-handling are mission-critical from day one: a package is a client, not a payments platform. If you need uptime guarantees, the wrapper is the smallest part of the problem.

How to Pitch It (Stakeholders)

Executives: This is a small, MIT-licensed Laravel wrapper for Safaricom's M-Pesa Daraja API — plumbing, not a payments company. It exists to make Kenya/East Africa market entry fast and cheap: it collapses a multi-week Daraja integration into a config file plus a service calls covering STK Push, C2B, B2C, transaction status, and reversals. No license cost, compatible with our Laravel version, actively maintained. The project has just cut a v2.0.0 beta, which tells us the maintainer is investing in the next generation but also that the API is about to move; we should build on the stable v1 line and treat v2 as a tracked watch item, not a dependency. The risk is maturity, not capability: a small, single-maintainer project with no support contract. Mitigation is straightforward — pin the version, wrap it behind our own payment interface, and fund the operational layer (reconciliation, retries, monitoring) that no package provides.

Engineering: Laravel 5–12 support, MIT, env-driven credentials with sandbox/production switching, OAuth token handling and callback wiring already done. Target the latest stable v1.x tag; do not take a beta dependency into production. The v2.0.0-beta.1 release notes only mention a CI fix for installable beta pre-releases — no changelog for the major bump itself, so assume undocumented breaking changes and read the diff before any upgrade. What we still own: idempotency keys, a reconciliation ledger, webhook verification, retry/backoff, and observability. Recommended shape: adopt behind an internal PaymentGateway contract so the underlying client is swappable, with integration tests run against the Daraja sandbox in CI. Add a cheap guardrail: a scheduled check on upstream releases so we learn about v2 GA and any v1 deprecation from us, not from a broken deploy.

Ask: Approve a time-boxed 1–2 week spike to prove STK Push end-to-end in sandbox on the stable v1 line and produce a fork-or-vendor recommendation, plus a standing line item to re-evaluate at v2 GA. Commit to build vs. adopt before the payments epic is scheduled.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel