Back to blog

How to Accept Online Payments in Kenya for Small Businesses (2026 Guide)

Kenya remains one of the most exciting places in the world to run a small business — and one of the biggest reasons is mobile money. With tens of millions of

 How to Accept Online Payments in Kenya for Small Businesses (2026 Guide)

Kenya remains one of the most exciting places in the world to run a small business — and one of the biggest reasons is mobile money. With tens of millions of M-Pesa users and a fast-maturing e-commerce scene, Kenyan customers expect to pay online in 2026, whether they're buying from your shop in Nairobi, your Instagram page, your WhatsApp Business catalogue, or your website.

If you're still relying on cash or "send money to my personal number," you're losing sales. Here's a practical, step-by-step guide to accepting online payments in Kenya in 2026 — including technical integration snippets if you (or your developer) want to go deeper.


Why Your Small Business Needs Online Payments

  • Reach more customers – Sell to customers anywhere in Kenya (and beyond), not just those who can pay cash in person.
  • Build trust – A proper Paybill number or secure checkout signals that your business is legitimate.
  • Reduce risk – No cash to carry, lose, or miscount.
  • Get paid faster – Instant confirmations and digital records for every sale.
  • Simplify bookkeeping – Automatic transaction records make KRA eTIMS compliance, tax filing, and reconciliations much easier.

Why Your Small Business Needs Online Payments

Popular Payment Methods in Kenya (2026)

Before choosing a provider, know how Kenyans actually pay:

  1. M-Pesa – Still the undisputed king. The majority of online transactions in Kenya go through M-Pesa, so this is non-negotiable.
  2. Airtel Money & T-Kash – Smaller but worth supporting for wider reach.
  3. Debit/Credit Cards – Visa and Mastercard usage keeps growing, boosted by virtual cards and higher-value online purchases.
  4. Bank transfers & mobile banking apps – Common for B2B and invoice payments.
  5. PayPal & international wallets – Useful for international customers, freelancers, and exporters.

Ways to Accept Online Payments

1. Get an M-Pesa Paybill or Till Number

Apply through Safaricom for a Paybill (paid to your business account) or Buy Goods Till. This lets customers pay you directly from their M-Pesa. You'll need business registration documents to qualify.

Best for: Businesses that mainly need M-Pesa and don't need website integration.

2. Use a Payment Service Provider (Recommended)

A payment aggregator gives you one account that accepts M-Pesa, cards, bank transfers, and more — often with simple plugins, hosted checkout pages, or APIs. This is the fastest route for most small businesses.

3. Payment Links

No website? No problem. Many providers let you generate a payment link and share it via WhatsApp, Instagram, SMS, or email. The customer clicks, pays, and you get notified instantly.

3. Payment Links

4. Integrate With Your Website or Online Store

If you run a website, WooCommerce, or Shopify store, most Kenyan payment providers offer plugins or APIs so customers can check out without leaving your page.

5. Custom API Integration (For Developers)

If you're building your own platform — a marketplace, SaaS product, or custom shop — direct API integration gives you full control over the checkout experience. See the code snippets below.


Payment Providers to Consider in Kenya (2026)

Here are some popular options for Kenyan small businesses:

  • Fortpesa – A Kenya-focused payments platform that helps small and medium businesses accept mobile money and card payments online, with tools built for the local market. A great starting point if you want local support and simple setup. 👉 Visit fortpesa.co.ke
  • M-Pesa (Daraja API) – Safaricom's official API for businesses that want direct M-Pesa integration.
  • Pesapal – A long-established Kenyan provider supporting M-Pesa, cards, and more.
  • Flutterwave – Pan-African payments company with strong e-commerce tools.
  • Paystack – Popular for its clean checkout and developer-friendly API.
  • DPO (Direct Pay Online) – Widely used by travel, hospitality, and e-commerce businesses.
  • IntaSend – Kenyan provider known for easy integration and payment links.

For Developers: Integrating M-Pesa Payments (Node.js Examples)

If you have a website and want to integrate M-Pesa directly, the Safaricom Daraja API is the way to go. The most common integration is STK Push (Lipa na M-Pesa Online) — it sends a payment prompt straight to the customer's phone.

For Developers: Integrating M-Pesa Payments (Node.js Example

Note: These are simplified examples. Always use sandbox credentials first, store secrets in environment variables, and follow Safaricom's current documentation.

Step 1: Get an Access Token

// npm install axios
const axios = require("axios");

const CONSUMER_KEY = process.env.MPESA_CONSUMER_KEY;
const CONSUMER_SECRET = process.env.MPESA_CONSUMER_SECRET;

async function getAccessToken() {
  const auth = Buffer.from(
    `${CONSUMER_KEY}:${CONSUMER_SECRET}`
  ).toString("base64");

  const { data } = await axios.get(
    "https://api.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials",
    { headers: { Authorization: `Basic ${auth}` } }
  );

  return data.access_token;
}

Step 2: Send an STK Push (Payment Prompt to Customer's Phone)

const SHORTCODE = process.env.MPESA_SHORTCODE;   // Your Paybill
const PASSKEY = process.env.MPESA_PASSKEY;       // From your Daraja account
const CALLBACK_URL = "https://yourdomain.co.ke/api/mpesa/callback";

async function stkPush(customerPhone, amount, orderId) {
  const token = await getAccessToken();

  // Timestamp format: YYYYMMDDHHMMSS (EAT)
  const timestamp = new Date()
    .toLocaleString("en-GB", { timeZone: "Africa/Nairobi", hour12: false })
    .replace(/\D/g, "")
    .slice(0, 14);

  const password = Buffer.from(
    `${SHORTCODE}${PASSKEY}${timestamp}`
  ).toString("base64");

  const { data } = await axios.post(
    "https://api.safaricom.co.ke/mpesa/stkpush/v1/processrequest",
    {
      BusinessShortCode: SHORTCODE,
      Password: password,
      Timestamp: timestamp,
      TransactionType: "CustomerPayBillOnline",
      Amount: amount,
      PartyA: customerPhone,          // e.g. "254712345678"
      PartyB: SHORTCODE,
      PhoneNumber: customerPhone,
      CallBackURL: CALLBACK_URL,
      AccountReference: `ORDER-${orderId}`,
      TransactionDesc: "Payment for your order",
    },
    { headers: { Authorization: `Bearer ${token}` } }
  );

  return data; // Customer now receives the M-Pesa prompt
}

Step 3: Handle the Payment Confirmation (Callback/Webhook)

// Express route that receives M-Pesa's confirmation
app.post("/api/mpesa/callback", (req, res) => {
  const callback = req.body.Body.stkCallback;

  if (callback.ResultCode === 0) {
    // Payment succeeded — update your database here
    const metadata = callback.CallbackMetadata.Item;
    const amount = metadata.find((i) => i.Name === "Amount")?.Value;
    const receipt = metadata.find(
      (i) => i.Name === "MpesaReceiptNumber"
    )?.Value;
    const phone = metadata.find((i) => i.Name === "PhoneNumber")?.Value;

    console.log(
      `✅ KES ${amount} received from ${phone}. Receipt: ${receipt}`
    );
    // e.g. await Order.markAsPaid(callback.ResultDesc, receipt);
  } else {
    console.log("❌ Payment failed:", callback.ResultDesc);
  }

  // Always acknowledge the callback
  res.json({ ResultCode: 0, ResultDesc: "Accepted" });
});

Bonus: Simpler Alternative — Hosted Checkout

If you'd rather not manage callbacks and tokens yourself, most payment providers (including Fortpesa) offer hosted checkout pages or payment links. You simply redirect the customer to a URL and handle a single webhook when payment succeeds:

Bonus: Simpler Alternative — Hosted Checkout

// Example: redirect customer to a hosted checkout page
app.get("/checkout/:orderId", async (req, res) => {
  const order = await Order.findById(req.params.orderId);

  const checkoutUrl = await paymentProvider.createCheckout({
    amount: order.total,
    currency: "KES",
    reference: order.id,
    callbackUrl: "https://yourdomain.co.ke/api/payments/confirm",
  });

  res.redirect(checkoutUrl);
});

How to Get Started: 5 Simple Steps

  1. Register your business. Get your business registration certificate and KRA PIN (and onboard to eTIMS if you haven't — it's now standard for Kenyan businesses). Most Paybill numbers and payment provider accounts require these.
  2. Choose a provider. Compare fees, settlement times, supported payment methods, and ease of setup.
  3. Create your account and complete verification. Have your documents ready — approval is usually quick.
  4. Set up how you'll collect payments. Use a payment link, hosted checkout, plugin, or API depending on how you sell.
  5. Test, then go live. Do a small test transaction, confirm settlement to your bank account, and start sharing your payment details with customers.

What to Look For in a Payment Provider

  • M-Pesa support (essential in Kenya) plus cards and other mobile money options
  • Transparent fees – Most providers charge roughly 1–3% per transaction; watch for hidden charges
  • Fast settlement – How quickly does money reach your bank?
  • CBK licensing – Work with providers regulated by the Central Bank of Kenya
  • Easy integration – Payment links, plugins, and well-documented APIs
  • Responsive local support – When something goes wrong, you want help fast

Frequently Asked Questions

Do I need a website to accept online payments? No. Payment links and M-Pesa Paybill/Till numbers work perfectly with WhatsApp Business, Instagram, or Facebook selling.

How much does it cost? Expect transaction fees of roughly 1–3% depending on the provider and payment method. Some providers also charge small setup or monthly fees.

Can I accept payments from international customers? Yes — card payments and PayPal are the most common options for international sales. Many Kenyan providers support both.

How do I get the money? Funds are typically settled to your bank account daily or within a few business days, depending on the provider.

Do I need a developer to integrate M-Pesa? Not necessarily. Payment links and hosted checkouts require zero code. Direct API integration (like the STK Push example above) is only needed for custom platforms — and any web developer familiar with REST APIs can handle it.


Final Thoughts

Accepting online payments in Kenya has never been easier or more important. For most small businesses, the smartest move in 2026 is to sign up with a payment provider that covers M-Pesa, cards, and other methods in one place — so you never miss a sale, no matter how your customer wants to pay.

Ready to start accepting payments online? Get started with Fortpesa today →

7.7Ksubscribers
50+tutorials
Freeforever

You made it to the end.

Most people don't. Since you're here: we teach this stuff on YouTube, free, every week. 7.7K developers already watch. Pull up a chair.

Watch on @fortunedevacademy

READY TO START
A PROJECT?

Let's discuss your next project.

START A PROJECT