Portfolio Project

Safaricom Daraja API
Integration Demo

A sandbox application demonstrating STK Push, STK Query, C2B and B2C payment flows using the Safaricom Daraja REST API — built with Laravel and pure CSS.

Laravel 13 PHP 8.3 MySQL Daraja Sandbox Pure CSS

STK Push

Trigger a payment prompt on a customer's phone via M-Pesa Express.

Open

STK Query

Check the status of a previous STK Push by Checkout Request ID.

Open

C2B Simulate

Simulate a customer paying a business shortcode via Paybill.

Open

B2C Payment

Send money from a business to a customer's M-Pesa wallet.

Open
Recent Transactions View all
Date / Time API Phone Amount Status
15 Jun 2026, 06:44 stk_push 254796042908 KES 1.00 success
15 Jun 2026, 06:44 stk_push 254711439328 KES 1.00 failed
15 Jun 2026, 06:43 stk_push 254796042908 KES 1.00 failed
Sandbox Reference

Shortcode

174379

Test Phone

254708374149

Environment

Sandbox

Base URL

sandbox.safaricom.co.ke