Add funds to your service wallet via M-Pesa STK Push.
WALLET_TOPUP type. The
balance update happens after the STK callback is received from M-Pesa — usually within
1–2 minutes.
Idempotency-Key header to safely retry a top-up request without creating
duplicates:
Idempotency-Key was already accepted, the original response
is returned without initiating a new STK Push. Use a unique key per top-up attempt
(e.g. include a date or sequence number).
Use your API key as the username. Leave the password field empty.
Authorization: Basic <base64(apikey:)>
You can also pass the raw API key:
Authorization: Basic <apikey>
Optional unique key for idempotent retries. If a top-up with the same key was already processed, the original response is returned.
Top-up amount in KES.
x >= 1500
Phone to send the STK Push to.
"0712345678"
12"TOPUP-001"
Description shown on the STK prompt.
13"Wallet Top-Up"
HTTPS URL for the top-up result notification.
"https://yourserver.com/webhooks/topup"