M-Pesa STK Push
mpesa_stk_pushSends an M-Pesa payment prompt to the customer's phone for PIN entry to complete payment. Returns a CheckoutRequestID to track the transaction.
Instructions
Trigger an M-Pesa STK Push — sends a payment prompt to the customer's phone. The customer enters their M-Pesa PIN to complete payment. Returns a CheckoutRequestID to track the transaction with mpesa_stk_query. Async: use mpesa_stk_query after 10-30 seconds to check completion.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| phone | Yes | Customer phone number (any Kenyan format: +254..., 07..., 254...) | |
| amount | Yes | Amount in KES (whole number, minimum 1) | |
| account_ref | Yes | Account reference shown to customer on their phone (max 12 chars) | |
| description | No | Transaction description (max 13 chars) | Payment |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||