How to connect your M-Pesa Till or Paybill to a POS (Daraja, step by step)
ShelfWise ·
When your POS is connected to M-Pesa through Daraja, Safaricom tells the POS about every payment to your Till or Paybill, and the till can send the customer a payment prompt. No more checking messages or typing codes. Here is how it works and how to set it up.
What Daraja is
Daraja is Safaricom's M-Pesa API: the official way for software to receive M-Pesa payments. Two parts matter for a shop. M-Pesa Express (also called STK push or Lipa Na M-Pesa Online) sends a prompt to the customer's phone for the exact amount. Customer to Business (C2B) reports payments customers make to your number themselves.
What you need first
- An M-Pesa Till (Buy Goods) or Paybill registered to your business.
- Access to the M-Pesa business account's Business Manager (the user who receives Safaricom's codes).
- An account on developer.safaricom.co.ke.
Step 1: Go Live on the Daraja portal
- Sign in at developer.safaricom.co.ke and open Go Live.
- Choose verification by shortcode. Enter your Paybill number, or your store number for a Till, your business name and the Business Manager's username.
- Enter the code Safaricom sends to that user's phone.
- Choose M-Pesa Express and Customer to Business (C2B), and create the app.
- Copy the app's consumer key and consumer secret. Keys from a test (sandbox) app won't work.
Step 2: Get your M-Pesa Express passkey
Safaricom emails the passkey to your business's administrator after Go Live. It isn't shown on the portal. If it hasn't come after two working days, email [email protected] with your shortcode and app name and ask for the M-Pesa Express passkey.
Step 3: Connect it to your POS
In ShelfWise, open Settings → Payments, choose Till or Paybill, enter your numbers and paste the key, secret and passkey. ShelfWise then asks Safaricom to report every payment to your number. Full steps with screenshots are on our M-Pesa setup page.
Step 4: Test with KSh 1
- Sell something for KSh 1, choose M-Pesa, send a prompt to your own phone and enter your PIN. The sale should complete by itself.
- Pay KSh 1 to your Till or Paybill from your phone. It should appear at the till.
Common errors
| What you see | Usual cause |
|---|---|
| “Invalid access token” | Sandbox keys, or the live app doesn't include M-Pesa Express and C2B. |
| “Invalid PartyB” with a Till | Till number and store number swapped. |
| Prompt arrives but payment fails | Passkey is for a different number, often the Till instead of the store number. |
| Payments to your number don't show | An older system registered its addresses for your number. Safaricom allows one; ask [email protected] to remove them. |
Common questions
Can I use a Till number (Buy Goods) with a POS?
Yes. With a Till, Daraja uses your store number (head office number) for Go Live and the passkey, and the Till number for payments.
How long does Daraja Go Live take?
Creating the live app is usually same day. The passkey email from Safaricom can take one to two working days.
Do I pay Safaricom extra for Daraja?
Daraja itself is free to use. Your normal M-Pesa business tariffs still apply.
Read next
- How to choose the best POS system for a small business in KenyaA checklist for choosing a POS in Kenya: M-Pesa matching, offline sales, stock control, phone or computer, Kiswahili, support, price and questions to ask every vendor.Read
- How to stop stock loss and theft in your shop: 8 habits that workPractical ways for Kenyan dukas, minimarts and hardware shops to stop stock loss: counts, records, cash and M-Pesa checks, supplier deliveries and staff habits.Read