b2c_payment_and_wait
Pay money to a customer via M-Pesa and wait for the callback to receive the receipt number upon successful completion.
Instructions
Pay money out to a customer and wait for the result callback, returning the receipt number on success.
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": {
"phoneNumber": "<phoneNumber>",
"amount": "<amount>"
},
"name": "b2c_payment_and_wait"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount in KES, whole numbers only. | |
| remarks | No | Payment | |
| occasion | No | ||
| commandId | No | BusinessPayment for general payouts, SalaryPayment for salaries (allows unregistered recipients), PromotionPayment for winnings. | BusinessPayment |
| resultUrl | No | ||
| shortCode | No | ||
| phoneNumber | Yes | Recipient phone number. | |
| timeoutSeconds | No |