Top Up Service Wallet
Add funds to your service wallet via M-Pesa STK Push.
How it works
A top-up sends an STK Push to the phone number you specify. When the M-Pesa PIN is entered, the amount is deposited into your service wallet.- Top-ups appear in your transaction list with type
WALLET_TOPUP - Balance updates after the STK callback is received from M-Pesa — usually within 1–2 minutes
Idempotent retries
UseIdempotency-Key to safely retry without creating duplicate top-ups.
Idempotency-Key was already accepted, the original response is returned without initiating a new STK Push. Use a unique key per top-up attempt (include a date or sequence number).
When to top up
- Top up before your balance drops below your minimum operating threshold
- For high-volume operations, maintain a buffer of 2–5× your expected daily fee spend
- The result is delivered asynchronously — poll
GET /transactions/{id}to confirm the balance update
Authorizations
Paste your PalPluss API key in the username field and leave the password field empty — it is ignored.
Get your key from console → Settings → API Keys (starts with pk_live_ or pk_test_).
In your own code, send the key directly:
Authorization: Basic YOUR_API_KEY
Headers
Optional unique key for idempotent retries. If a top-up with the same key was already processed, the original response is returned.
Body
Top-up amount in KES.
x >= 1500
Phone number to send the STK Push prompt to.
"0712345678"
Optional reference label for this top-up. Appears in the M-Pesa statement.
120"TOPUP-001"
Optional description shown in your transaction history.
255"Service wallet top-up"