Secure REST APIs, signed webhooks, and ready-made plugins. Authenticate with Bearer tokens from your dashboard.
Bearer tokens, scopes, and Test Connection.
Open documentation →Invoices, payments, customers, and integrations.
Open documentation →HMAC verification and event payloads.
Open documentation →Install the gateway and map dashboard credentials.
Open documentation →Official Laravel SDK — leefipay/mpesa on Packagist.
cURL, PHP, Node, Python, and Laravel.
Open documentation →Download the v1 collection.
Download →Machine-readable API specification.
Download →Per-token throttles and plan limits.
Open documentation →Issue credentials from Settings → API & Integrations. Send Authorization: Bearer {secret}. Base URL: https://leefipay.com/api/v1.
Deliveries are signed with HMAC-SHA256(timestamp + "." + body, secret) using headers X-LeefiPay-Timestamp, X-LeefiPay-Signature, and X-LeefiPay-Event.
Default throttle is 60 requests / minute. Responses use a JSON envelope with success, message, data, and optional errors.
Official Laravel package for the LeefiPay M-Pesa Open API:
leefipay/mpesa.
STK Push, payment status, channels, and signed webhooks — without calling Daraja directly.
composer require leefipay/mpesa
Configure .env with your dashboard secret Bearer token, then:
use LeefiPay\Mpesa\Facades\LeefiPay;
$response = LeefiPay::stkPush([
'phone' => '254700000000',
'amount' => 100,
'payment_channel_id' => 1,
'reference' => 'ORDER-1001',
]);
Full install, config, and webhook docs: packagist.org/packages/leefipay/mpesa.
curl -X POST "https://leefipay.com/api/v1/integrations/test" \ -H "Authorization: Bearer YOUR_SECRET_API_KEY" \ -H "Accept: application/json"
const res = await fetch('https://leefipay.com/api/v1/integrations/test', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.LEEFIPAY_SECRET}`, Accept: 'application/json' },
});
console.log(await res.json());
import requests
print(requests.post(
"https://leefipay.com/api/v1/integrations/test",
headers={"Authorization": f"Bearer {secret}", "Accept": "application/json"},
).json())
composer require leefipay/mpesa use LeefiPay\Mpesa\Facades\LeefiPay; LeefiPay::testConnection();
Package details and more: https://packagist.org/packages/leefipay/mpesa