STK Push
Trigger M-Pesa payment prompts directly on your customer's phone.
Overview
STK Push (Lipa na M-Pesa Online) allows you to initiate a payment request that appears as a popup on the customer's mobile device, asking them to enter their M-Pesa PIN. KiPay routes the request for you — new accounts don't need their own Safaricom Daraja app to use this.
Initiate Request
Send a POST request to the /collections/stk endpoint.
POST /v1/collections/stk
{
"phone": "254712345678",
"amount": 1000,
"reference": "ORDER-123",
"narration": "Payment for items"
}Parameters
- •phone: The customer's phone number. Accepts 07XXXXXXXX, 7XXXXXXXX, or 2547XXXXXXXX — normalised automatically.
- •amount: The amount to charge in KES.
- •reference: Your internal order or invoice ID.
- •narration (optional): A short description shown to the user.
- •provider (optional, sandbox only): Force this specific test through "fingopay" or "daraja" regardless of your account's configured rail.
Response
The request returns immediately with status "pending". The final outcome arrives via webhook — see Transaction Webhooks.
{
"id": "txn_01JQMC4V8XPNBZR",
"status": "pending",
"checkout_request_id": "ws_CO_392...",
"amount": 1000,
"currency": "KES"
}