Use this endpoint to send an M-Pesa STK push (Lipa na M-Pesa Express) prompt directly to a customer’s phone. When you call this endpoint, the customer receives a payment dialog on their device and approves the charge with their M-Pesa PIN. No redirect or frontend action is required. This endpoint requires your secret key and is intended for server-to-server calls only. If you need to trigger M-Pesa from a client-side context, use the collect payment endpoint with yourDocumentation Index
Fetch the complete documentation index at: https://developers.kulmipay.com/llms.txt
Use this file to discover all available pages before exploring further.
public_key instead.
Method: POSTURL:
https://app.kulmipay.com/api/v1/payment/mpesa-stk-push/
Authentication
Request
Customer’s M-Pesa phone number in
254XXXXXXXXX format. The number must be a registered Safaricom line with an active M-Pesa account.Amount to charge in KES. Decimal values are rounded up to the nearest whole shilling before the STK push is sent. Account and M-Pesa limits may apply.
Your reference for this transaction, up to 140 characters. Stored on the invoice and returned in webhook events. Defaults to
"MPesa Express" if omitted.Alias ID of a specific KES wallet to receive the funds. If omitted, funds go to your default KES settlement wallet.
Who bears the M-Pesa processing fee.
BUSINESS-PAYS deducts the fee from your settlement; CUSTOMER-PAYS adds the fee on top of amount before sending the prompt. If your account has a default tariff set in Payment Settings, that value is used when this field is omitted.Response
The response contains the payment session created for this request, including the invoice and customer details.Payment session UUID.
Invoice created for this STK push.
Customer record associated with this session.
ISO 8601 timestamp when the session was created.
Code examples
Example response
The STK push prompt expires if the customer does not respond in time. Poll the payment status endpoint with the returned
invoice.invoice_id to detect the final state, or subscribe to webhook events to receive a push notification when the payment completes.