In Kenya, most online buyers would rather pay with M-Pesa than with a card. An auction or marketplace site that offers only cards loses many of them at checkout. This guide covers taking M-Pesa payments on a self-hosted BidKing or PrizeX site: how the M-Pesa add-on works, the setup, pricing in shillings, and what to check before launch.

How the M-Pesa add-on takes a payment

The M-Pesa add-on, available from Add-ons in your admin panel, uses Safaricom's STK Push: the customer gets a payment prompt on their phone and confirms it with their M-Pesa PIN. Step by step:

  1. The customer chooses M-Pesa at checkout. If their account has a valid Kenyan mobile number, it's used; otherwise they're asked for one. Numbers like 07…, 01…, +254… and 254… are all accepted and converted to the format Safaricom needs.
  2. The prompt is sent, and the page shows "Waiting for M-Pesa to confirm…". It checks every few seconds, and moves on to the success or failure page by itself.
  3. The payment is confirmed. When Safaricom calls back, the site asks Safaricom for the payment's real status rather than trusting the callback alone. It also checks that the amount paid matches what was asked. Only then are the coins credited or the order placed.

A few details worth knowing:

Setting it up

Pricing in shillings

M-Pesa takes payments in Kenyan shillings only. If your store's currency isn't KES, the M-Pesa option tells the customer to choose another payment method.

Mobile-first checkout

Most of your buyers will be on phones. BidKing's storefront is responsive and installs as a web app, and the STK Push flow happens entirely on the phone. Keep the M-Pesa option first in your gateway list for Kenyan buyers, and keep your checkout pages light.

Legal and practical checks

Common questions

Can BidKing take M-Pesa payments?

Yes, with the M-Pesa add-on from Add-ons in your admin panel. It sends an STK Push prompt to the customer's phone and confirms the payment with Safaricom before crediting it.

Does it work with a Till number?

No. The add-on sends Paybill (CustomerPayBillOnline) requests, so you need a Paybill short code with Lipa Na M-Pesa Online enabled.

What happens to amounts with cents?

M-Pesa takes whole shillings, so the amount is rounded up, for example KES 99.50 to KES 100. The customer sees the rounded figure before the prompt is sent.

A customer paid but the order is still pending. What now?

Use Check with gateway on the payment request in the admin. It asks Safaricom about the payment, and settles the request if the payment is confirmed and the amount matches.

BidKing — self-hosted PHP auction script Add M-Pesa from Add-ons in your admin panel, alongside Stripe, PayPal, Razorpay and eight more built in. One-time licence.