public_key instead.
Method: POSTURL:
https://app.kulmipay.com/api/v1/payment/mpesa-stk-push/
Authentication
Request
string
required
Customer’s M-Pesa phone number in
254XXXXXXXXX format. The number must be a registered Safaricom line with an active M-Pesa account.number
required
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.
string
Your reference for this transaction, up to 140 characters. Stored on the invoice and returned in webhook events. Defaults to
"MPesa Express" if omitted.string
Alias ID of a specific KES wallet to receive the funds. If omitted, funds go to your default KES settlement wallet.
string
default:"BUSINESS-PAYS"
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.string
Payment session UUID.
object
Invoice created for this STK push.
object
Customer record associated with this session.
string
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.