API Documentation
Integrate Lipa Na RiverPen aggregation core into your backend systems.
Welcome to the Lipa Na RiverPen API portal. Our aggregation layer provides unified, secure RESTful interfaces for integrating Safaricom M-Pesa services (C2B, B2C, STK Push) into custom ERPs and web frameworks.
STK Push Initiation
Trigger a secure customer-facing payment popup via STK Push by sending a POST request containing transaction details and checkout configurations.
POST /api/v1/stk/push
Authorization: Bearer rp_live_...
Content-Type: application/json
{
"amount": 1500,
"phoneNumber": "+254712345678",
"callbackUrl": "https://yourdomain.com/callback"
}Webhooks & Callback Verification
Our webhook dispatch system notifies your callback endpoint immediately upon payment resolution. All callbacks carry SHA-256 HMAC cryptographic signatures inside the headers to prevent spoofing.