How UnifiedPay Works

Simple 3-step process to start accepting M-Pesa payments via API.

1

Sign Up & Link Payment Method

Create an account, then link your Paybill, Till Number, or Bank / SACCO account from the dashboard. Each account gets its own API credentials and becomes active once its KES 300 subscription (per 30 days) is paid via M-Pesa.

You'll receive:
  • ✓ Consumer Key
  • ✓ Consumer Secret
  • ✓ Shortcode
Example credentials:
ck_2f8a9c3e7b1d4a6f9c2e8b5d7a
cs_9f2e8c7a1b6d3f5e9a2c8b4d7e
▼
2

Integrate the API Endpoints

Use our three simple REST endpoints to manage payments. No complex Daraja setup – we handle the heavy lifting.

Validate

Check credentials

/auth/cred/.../url

STK Push

Prompt payment

/sendstk

Status

Check payment

/sendstatus

Here's a minimal PHP example to initiate a payment:

<?php
$url = 'https://unifiedpay.co.ke/auth/cred/YOUR_KEY/YOUR_SECRET/sendstk';
$data = ['amount' => 100, 'msisdn' => '254712345678', 'reference' => 'Order #123'];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
▼
3

Receive Payment & Confirm

The customer receives an STK push on their phone. Once they enter their PIN, the payment is processed. You can query the status using the transaction ID returned in step 2.


Customer Phone
→

UnifiedPay API
→

M-Pesa
→

Payment Done

Add a callback URL in your dashboard to receive real-time payment results on your own server.

Get Started →

KES 300 per account per 30 days. Payments go straight to your account.