For the complete documentation index, see llms.txt. This page is also available as Markdown.

Collect

This endpoint enables you to collect payments from customers - both STK prompt and direct payment to paybill number.

POST {{uri}}/kes/collect

Body Request


name
type
description

shortcode

string

Customer's phone number

amount

integer

Amount to collect

mobile_network

string

Mobile money network i.e Safaricom, or Airtel

callback_url

url

URL to receive payment notification

{
    "code": 200,
    "message": "Prompt sent",
    "data": {
        "status": "PENDING",
        "transaction_code": "DDM6D",
        "message": "Success! Processing payment..."
    }
}
{
   "code": 400,
   "message": "Failed - Bad Request"
}

Last updated