Demo mode is ON. Payments are simulated: schools can "pay" without any money moving and get access. Use it to rehearse the flow, then switch to Production before real customers use the system.
Production = real money. Only choose this after Safaricom has approved your Go-Live and you are using your production Consumer Key, Secret and Passkey.
📘 Setup guide — how to get your Daraja keys and make a test payment
Create a Daraja account. Go to developer.safaricom.co.ke → Sign up (or Log in).
Create an app. Open My Apps → Add a new app → give it a name (e.g. ExamPro) → tick Lipa Na M-Pesa Sandbox → Create app.
Copy the keys. Open your app. Copy the Consumer Key and the Consumer Secret (click the eye / “show” to reveal it) and paste them into the two boxes above.
Shortcode and passkey. For the sandbox press “Fill Safaricom sandbox test values” above (shortcode 174379 and Safaricom's public test passkey). You can double-check them in Daraja under APIs → M-Pesa Express (STK Push) → the test credentials shown there.
Public website address. Safaricom must be able to reach this server over https.
If this is on a real domain, press “Use this address”. If you are testing on your own computer, install ngrok or cloudflared, run ngrok http 3000, copy the https://…ngrok… address it prints and paste it above. Open this console through that address, or paste it manually.
Mode = Sandbox, then press “Save & test connection”. It should say Connected to Safaricom (sandbox). If it says the key or secret is wrong, re-copy them (no spaces) and make sure they come from the sandbox app.
Make a test payment. Sign in as a school admin → 💳 Subscription tab → choose a plan → enter the sandbox test number 0708 374 149 → Pay. Safaricom's sandbox is a simulator: it normally does not put a prompt on a real phone — it answers as if you paid and then posts the result to your website address. The page then unlocks by itself, and the payment shows up under Recent payments below.
Sandbox behaviour can change and sometimes stays on “waiting”. To rehearse the whole experience instantly, switch Mode to Demo. Number 0700 000 000 simulates a cancelled payment in Demo mode.
Going live. In Daraja choose Go Live and follow Safaricom's steps for your Paybill or Till. They give you production credentials. Come back here: Mode = Production, paste the production Consumer Key, Secret, your real Shortcode and Passkey (for a Till choose “Till number”, put your store/head-office number as Shortcode and the Till number below it), use an https address, Save & test.
Subscriptions & M-Pesa
Loading…
Plans & prices what schools can buy (amounts in KES)
Name
Months
Price (KES)
Active
Recent payments
When
School
Plan
Amount
Status
M-Pesa receipt
Phone / by
Schools
School
Code
Status
Subscription
Teachers
Last activity
📱 Platform Owner OTP Reset
Enter your platform username and registered phone number to receive a 6-digit OTP.