Connect your Till, Paybill or Bank account in minutes. STK Push, webhooks and real-time transaction tracking — built for scale.
# Initiate STK Push curl -X POST https://api.pesaflux.co.ke/v1/initiatestk \ -H "Content-Type: application/json" \ -d '{ "api_key": "PSFX...", "email": "you@business.co.ke", "amount": "100", "msisdn": "254712345678", "reference": "INV-1024" }' # Response { "success": "200", "message": "Please enter your MPESA PIN to complete the transaction", "transaction_request_id": "PLFX0610202614..." }
// Initiate STK Push $payload = json_encode([ 'api_key' => 'PSFX...', 'email' => 'you@business.co.ke', 'amount' => '100', 'msisdn' => '254712345678', 'reference' => 'INV-1024', ]); $ch = curl_init('https://api.pesaflux.co.ke/v1/initiatestk'); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_POSTFIELDS => $payload, CURLOPT_HTTPHEADER => ['Content-Type: application/json'], CURLOPT_RETURNTRANSFER => true, ]); $response = json_decode(curl_exec($ch), true); // $response['transaction_request_id']
// Initiate STK Push const res = await fetch('https://api.pesaflux.co.ke/v1/initiatestk', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ api_key: 'PSFX...', email: 'you@business.co.ke', amount: '100', msisdn: '254712345678', reference: 'INV-1024', }), }); const data = await res.json(); // data.transaction_request_id
Everything you need to accept M-Pesa payments — simple, secure and developer-first.
Send a payment prompt straight to your customer's phone with a single POST request.
Get the result of every payment — receipt, amount and phone — posted to your callback URL in real time.
Look up any payment with transactionstatus to confirm it before you deliver.
Payments go directly to your linked Buy Goods Till, Paybill or bank account.
No website? Create a link, share it on WhatsApp or SMS and get paid — no code needed.
Test your integration end to end with sandbox credentials before you go live.
From signup to your first payment in under 10 minutes.
Sign up and verify your business details. It takes about a minute.
Add your Till, Paybill or Bank account and get an API key for it.
Call the API or share a payment link. Track every transaction on your dashboard.
One subscription per linked account, with unlimited transactions.
Create a free account and link your Till, Paybill or Bank in minutes.