M-Pesa setup

Connect your Till or Paybill, and every M-Pesa payment matches itself

ShelfWise connects to your own Till or Paybill through Daraja, Safaricom's official M-Pesa API. Nothing to install: Safaricom reports each payment to ShelfWise, so nobody checks M-Pesa messages by hand.

  • Customers pay your own Till or Paybill: the money goes straight to you, and ShelfWise never holds it
  • Safaricom tells ShelfWise about every payment the moment it arrives
  • Each payment is matched to its sale, online order or booking by itself
  • Send the customer an M-Pesa prompt from the till, and the sale completes when they enter their PIN
  • Find any payment by M-Pesa code, phone number, name or amount

Before you start

  • A Paybill, or a Till and its store number. For a Till, Safaricom uses the store number (the head office number) on Daraja, not the Till number customers pay to.
  • A user on the M-Pesa business portal (org.ke.m-pesa.com) with the Business Manager role. Safaricom sends a confirmation code to this user's phone. If you don't have one, ask your Safaricom relationship manager or email [email protected]; this can take a few days.
  • A free account at developer.safaricom.co.ke.
  • Your business name exactly as Safaricom has it for your Paybill or Till.

Getting M-Pesa live

  1. 1

    Go Live on the Daraja portal

    1. Sign in at developer.safaricom.co.ke and open Go Live.
    2. Choose verification by shortcode. Enter your Paybill number (or your store number for a Till), your business name and the Business Manager's username.
    3. Enter the code Safaricom sends to that user's phone.
    4. Choose the products M-Pesa Express and Customer to Business (C2B), and create the app.
    5. Open the new app and copy its consumer key and consumer secret. Keys from a test (sandbox) app won't work.
  2. 2

    Get your M-Pesa Express passkey

    1. Safaricom emails the passkey to your business's administrator once Go Live is approved. It isn't shown on the portal.
    2. If it hasn't arrived after two working days, email [email protected] and ask for the M-Pesa Express (Lipa Na M-Pesa Online) passkey, giving your shortcode and app name.
  3. 3

    Connect in ShelfWise

    1. On Settings → Payments, choose Till or Paybill and enter your numbers.
    2. Paste the consumer key, consumer secret and passkey, then click Connect M-Pesa.
    3. ShelfWise then asks Safaricom to report every payment to your number. When that works, a green note says so.
  4. 4

    Test with KSh 1

    1. At the till, sell something for KSh 1, choose M-Pesa, send a prompt to your own phone and enter your PIN. The sale completes by itself.
    2. Pay KSh 1 to your Paybill or Till from your phone. It appears under Paid to Till at the till and on Payments received.
    3. If you use the online shop, place a small order and pay with M-Pesa.

If something goes wrong

“Invalid access token”
The keys are from a test (sandbox) app, or the live app doesn't include M-Pesa Express and C2B.
“Invalid PartyB” with a Till
The Till number and store number are swapped. The store number goes in Store number (head office).
The prompt arrives but the payment fails
The passkey belongs to a different number, often the Till instead of the store number. Ask Safaricom for the passkey for your store number.
Safaricom isn't reporting payments made straight to your number
Another system, such as an older POS, has already registered its addresses for your number, and Safaricom allows only one. Remove them in the Daraja portal (URL management), or email [email protected] and ask them to delete the C2B URLs for your shortcode. Then click Try again on Settings → Payments.
A payment didn't match a sale
Open Payments received and link it to the sale by hand. This happens when the amount is different or the cashier picked another payment.

Stuck on a step? Chat with us on WhatsApp at +254 768 306 493 and we'll help you get live. Open WhatsApp

Ready when your customers are.

Start free for 14 days. Set up in an afternoon, on the phone you already have.