Skip to main content
POST
Top up service wallet
Fund your service wallet to keep payments running without interruption.

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

Use Idempotency-Key to safely retry without creating duplicate top-ups.
If a top-up with the same 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

Authorization
string
header
required

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

Idempotency-Key
string

Optional unique key for idempotent retries. If a top-up with the same key was already processed, the original response is returned.

Body

application/json
amount
number
required

Top-up amount in KES.

Required range: x >= 1
Example:

500

phone
string
required

Phone number to send the STK Push prompt to.

Example:

"0712345678"

accountReference
string

Optional reference label for this top-up. Appears in the M-Pesa statement.

Maximum string length: 120
Example:

"TOPUP-001"

transactionDesc
string

Optional description shown in your transaction history.

Maximum string length: 255
Example:

"Service wallet top-up"

Response

Top-up STK Push accepted.

success
boolean
required
Example:

true

data
object
required

Response payload. Shape varies by endpoint.

requestId
string<uuid>
required

Unique identifier for this API request. Include in support tickets.

Example:

"c1b2a3d4-e5f6-7890-abcd-ef1234567890"