M-PESA API for Kenyan developers

Your till.
Your money.
Direct.

Accept M-PESA payments through your own Safaricom till. One API call. Funds go directly to your account — no settlement delays, no middleman.

Start free — 14 daysSee how it works
No CBK licence needed
Till verified in under 4 hours
First payment in minutes
Initiate a paymentPOST /v1/payment/initiate
curl -X POST https://api.lipana.co.ke/v1/payment/initiate \
  -H "x-api-key: xpos_live_k_a3f9b2c7..." \
  -H "x-api-secret: sk_9f2b8e7d1a3c..." \
  -d { "phone": "0712345678", "amount": 1500 }
// Response — customer gets M-PESA prompt
{  "success": true,
    "transactionId": "clt9a0b001abc...",
    "message": "Success. Request accepted for processing" }
KES2.4M+
Processed this month
94%
Average success rate
4hr
Till verification time
0KES
Setup cost

Three steps to your first payment

01
Register and verify your till
Sign up, submit your Safaricom Buy Goods till number. We verify it — usually under 4 hours. Your money always goes directly to your own till.
Till or Paybill supported
02
Generate your API keys
Get a live key pair from your dashboard. Test in sandbox first — simulates the full STK push flow without real money. Flip to live when ready.
Test mode included free
03
Make one API call
Send phone + amount. Customer receives an M-PESA PIN prompt. They pay. Money hits your till. Your webhook fires. Done.
Webhook on every result

Everything you need, nothing you don't

Built for developers who want to ship fast and merchants who want payments that just work.

Direct to your till
Payments go from your customer's M-PESA wallet straight to your Safaricom Buy Goods or Paybill. We never touch your money. No escrow, no float, no waiting.
Buy Goods · Paybill
Real-time webhooks
Every payment result fires a signed webhook to your server — success, failure, cancellation. HMAC-SHA256 signature on every delivery. Retry with exponential backoff.
Signed · Retried · Logged
Secure by design
API keys use two-part credentials. Safaricom callback URL is secret-gated. IP allowlisted. Idempotency prevents duplicate charges. Till numbers encrypted at rest.
AES-256 · bcrypt · HMAC
Sandbox test mode
Test your entire integration without real money. Sandbox simulates the full STK push lifecycle — pending, success, failure, timeout. Test keys never count toward your limit.
Full lifecycle simulation
Dashboard Quick Pay
Non-technical merchants can collect payments directly from the dashboard. Enter phone and amount, click send. No API integration needed. Perfect for counter sales.
No code required
API logs and receipts
Every request is logged. Every M-PESA receipt number is stored. Export to CSV. Filter by status, mode, date. Full audit trail for your accounting records.
90-day retention

Pricing

Predictable flat-fee pricing.

Focus on building your product, not calculating transaction percentages. Keep 100% of the funds your clients process with pure software pricing.

Sandbox

Free
free forever
  • Unlimited test transactions
  • Magic test amounts — simulate every failure state
  • Full API access in test mode
  • TypeScript SDK
  • Webhook replay & delivery logs
  • Live STK Push
  • Real money moves
Get sandbox keys →

Starter

KES500
per month
Overage: KES 2 / tx after 500
  • 500 live transactions / month
  • STK Push API
  • Webhook notifications
  • Dashboard Quick Pay
  • API logs 30 days
  • Email support
  • Webhook retry dashboard
  • Team member access
Get started →
Hover to see client savings vs. Paystack
Hover / Click for Math
Example Scenario
If your client processes KES 200,000 / mo
IntaSend (3%)- KES 6,000
Paystack (1.5%)- KES 3,000
Lipana StarterKES 500 flat
Client saves vs. IntaSend
KES 5,500

Pro
Most popular

KES1,500
per month
Overage: KES 1.50 / tx after 3,000
  • 3,000 live transactions / month
  • STK Push API
  • Webhook notifications
  • Webhook retry dashboard
  • Team member & client access
  • API logs 90 days
  • WhatsApp support
Start free trial →
Hover to see client savings vs. Paystack
Hover / Click for Math
Example Scenario
If your client processes KES 1,000,000 / mo
IntaSend (3%)- KES 30,000
Paystack (1.5%)- KES 15,000
Lipana ProKES 1,500 flat
Client saves vs. IntaSend
KES 28,500

Scale

KES4,500
per month
Overage: KES 1 / tx after 15,000
  • 15,000 live transactions / month
  • STK Push API
  • Webhook notifications + retry
  • Team member & client access
  • Unlimited API logs
  • SLA uptime guarantee
  • Dedicated support line
Talk to us →
Hover to see client savings vs. Paystack
Hover / Click for Math
Example Scenario
If your client processes KES 5,000,000 / mo
IntaSend (3%)- KES 150,000
Paystack (1.5%)- KES 75,000
Lipana ScaleKES 4,500 flat
Client saves vs. IntaSend
KES 145,500

14-day free trial on all plans. Sandbox is free forever. No credit card required. API never blocks — overage charges keep your clients' payments flowing.

People who've shipped with Lipana

Got our till verified and activated in under 2 hours. We processed our first real transaction before the end of the day. Honestly, the Lipana API docs are the most developer-friendly I've seen in the Kenyan fintech space.
James K.
Equity Bakehouse, Nairobi
I integrated the entire checkout flow for our custom e-commerce backend in a single afternoon. The webhook delivery is instant and flawless — I entirely ripped out our old polling logic within 10 minutes of testing.
Aisha M.
Savanna Threads, Mombasa
Finally, a sandbox environment that genuinely mirrors production behavior. There were zero surprises or undocumented edge cases when we flipped the switch to live. The Quick Pay dashboard feature alone easily justifies the monthly subscription for our cashier team.
Peter N.
Rift Agro, Nakuru

Questions worth asking

Do I need my own Safaricom Daraja account?
No. That is the entire point. Lipana manages the Daraja API relationship. You provide your Buy Goods till number so payments go directly to you. We handle tokens, callbacks, retries, and error handling.
Does Lipana hold my money at any point?
Never. Money moves from your customer's M-PESA wallet to your Safaricom till in a single transaction. Lipana is a software platform — we don't process funds or hold float. This is why no CBK licence is required.
How long does till verification take?
We aim to verify under 4 hours during business hours (8am–6pm EAT, Monday–Friday). Weekends may take up to 24 hours. You receive an email and dashboard notification immediately on approval. You can test with sandbox keys while you wait.
What phone numbers are supported?
Safaricom numbers only — 07XX and 01XX prefixes. Airtel and Telkom are not supported by M-PESA STK Push. We accept all formats: 0712345678, +254712345678, 254712345678.
What happens if a payment times out or fails?
Safaricom sends a callback with the result code. We translate it into plain language and deliver it to your webhook — "Customer cancelled", "Request timed out", "Insufficient funds". Your transaction record is updated immediately. You can poll the status endpoint if you prefer not to use webhooks.
Is there a transaction fee on top of the subscription?
No per-transaction fee from Lipana. You pay the flat monthly subscription. Standard Safaricom M-PESA charges still apply to the customer's transfer, as with any M-PESA Buy Goods payment.

Your first payment,
today.

14-day free trial. 50 transactions to test everything. Till verified in hours. No card required.

Create free accountRead the docs