michaelgatuma/laravel-kopokopo
Laravel package wrapping the Kopo Kopo mobile money API. Accept M-Pesa payments, send money to recipients, and process transaction webhooks with an expressive, configurable interface. Simplifies connecting your Laravel app to Kopo Kopo's payment services in Kenya.
PaymentGateway port so the vendor choice stays reversible and additional country PSPs can slot in later without touching product code.Adopt when:
.env support) without writing and maintaining an HTTP client, OAuth token refresh, and webhook plumbing yourself.Look elsewhere when:
Release-specific caution: 1.3.1 ships without release notes beyond an auto-generated diff link. Before promoting to production, have an engineer review the 1.3.0 → 1.3.1 commit diff and confirm no behavioral change in webhook or auth paths. Absence of notes is not evidence of absence of change. Also confirm the package's Laravel version constraints before assuming drop-in compatibility with recent framework releases.
To executives (one paragraph):
This is glue code, not a platform bet. It shortens Kenya payment integration from an estimated multi-week build to a few days of configuration and wiring, which lets us test the market cheaply. It is a single-vendor, single-maintainer dependency, so we contain that risk by routing it behind our own payments interface: if it stalls or we outgrow it, we swap the adapter without touching product code. Cost to try is low; cost to reverse is low. Recommend a time-boxed spike followed by a go/no-go.
To engineering:
Thin Laravel wrapper over the Kopokopo REST API — config-based credentials (
.envonly), auto-discovered service provider, facade access, and webhook endpoint handling. Do not let vendor types leak into domain code: define aPaymentGatewayinterface (collect, disburse, status, refund) and implement it with this package. Enforce webhook idempotency at the boundary with a processed-events table and unique index, treat reconciliation polling as a first-class path (not a fallback), and pin the version explicitly incomposer.json. Note the tight operational constraints we'll have to build around: integer KES amounts only, strict2547XXXXXXXXphone formatting, publicly reachable HTTPS callback URLs, and Africa/Nairobi timestamps that must be normalized to UTC at ingest. Keep a handful of captured sandbox payloads as fixtures — including a duplicate, an out-of-order event, and a failure event — and replay them in CI. Treat the latest release as 1.3.1, a patch — no breaking changes or deprecations indicated, but notes are empty, so review the diff before bumping and re-run contract tests after.
The ask: approve a short integration spike, a pinned dependency with a named owner, and a documented fallback plan (fork or replace the adapter).
How can I help you explore Laravel packages today?