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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"phone": "<phone>",
"amount": "<amount>",
"account_ref": "<account_ref>"
},
"name": "mpesa_stk_push"
}
}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 | |||