Skip to navigation

Initiate M-Pesa Business Payment (Paybill/Till)

View as Markdown

category must be MPESA_PAYBILL (requires referenceNumber) or MPESA_TILL (referenceNumber optional). shortCode is the paybill/till number.

Headers

AuthorizationstringOptional
X-Device-IdstringOptional

Required on non-GET requests to non-public paths (DeviceSignatureFilter), skipped for GET/whitelisted/multipart requests and in the local profile.

X-SignaturestringOptional

Base64 ECDSA signature over sha256(body) + timestamp + requestId, signed with the device's registered private key.

X-TimestampstringOptional

Unix epoch seconds; must be within 5 minutes of server time.

X-Request-IdstringOptional

Unique per request - reused values are rejected as replays.

Idempotency-KeystringOptional

Request

This endpoint expects an object.
walletIdstringOptional
amountintegerOptional
categorystringOptional
shortCodestringOptionalformat: "color"
referenceNumberstringOptional
descriptionstringOptional

Response

200 OK
codeintegerOptional
messagestringOptional
dataobjectOptional