Most business software is only useful when it talks to something else: M-Pesa for payments, a bank for reconciliation, an SMS gateway for alerts, or a CRM for leads. API integration is the work that connects these systems — and it is where many Kenyan projects quietly fail.

This guide explains what good API integration looks like.

What an API integration developer does

The job is more than calling an endpoint. A competent integrator:

  • Reads the provider's documentation and contractual limits.
  • Handles authentication, tokens and expiry correctly.
  • Manages retries, timeouts and duplicate requests.
  • Stores and reconciles responses, not just "success" flags.
  • Logs enough to debug a failed payment days later.

The hard part is rarely the happy path. It is what happens when the network drops mid-request or the provider sends an unexpected response.

M-Pesa integration specifically

M-Pesa is the highest-stakes integration for most Kenyan businesses. A poor integration produces double charges, missing confirmations, and a support queue full of "I paid but the order is not complete".

A solid M-Pesa integration should:

  • Use the official API and correct environment credentials.
  • Match payments to orders using a unique reference.
  • Handle callbacks idempotently, so a repeated callback does not create a duplicate payment.
  • Reconcile against the transaction status API, not just the callback.
  • Show a clear pending state while a payment is confirmed.

Do not release an M-Pesa integration that marks orders paid on the client-side response alone. The confirmation must come from the server.

Payments and other integrations

The same principles apply to card processors, bank APIs, SMS, WhatsApp, accounting tools and e-commerce platforms:

  • Secrets never live in front-end code.
  • Webhooks are verified, not trusted blindly.
  • Failures are visible to staff, not silently lost.
  • Data is stored in a way that supports reconciliation and reporting.

What it costs in Kenya

In 2026, API integration work typically starts at KES 50,000 for a single, well-documented integration and rises with complexity. M-Pesa with reconciliation, multi-step payment flows or legacy system integration can run from KES 80,000 to 300,000+.

The cost is dominated by edge cases and testing, not the initial connection. Budget for testing with real sandbox transactions and a controlled live pilot.

What to check before you pay

  • The integrator has built a live M-Pesa or payment integration before.
  • Callbacks are handled idempotently.
  • There is a written reconciliation process.
  • Logs and error alerts exist.
  • The integration is documented so another developer can maintain it.

An integration that only works in the demo is not finished. It is finished when it survives a real week of traffic, refunds, timeouts and customer mistakes.

Need this done for you?

MUKI handles website repair, SSL, business email, POS installation, biometric attendance and property software onboarding across Nairobi, Kiambu, Ruiru and Thika.