Initiate B2C Payout
Send money directly to a customer’s M-Pesa mobile number.
Key notes
- Minimum amount: KES 10.
- The B2C wallet must have sufficient balance — insufficient funds return
409 INSUFFICIENT_FUNDS. - The wallet balance is debited immediately when the request is accepted.
- On failure, the debited balance is automatically reversed to your B2C wallet.
- The service fee (from your service wallet) is deducted on initiation and is not refunded on failure.
transactionFeein the response shows the service wallet amount reserved for this payout. It is0if no pricing rule is configured or the transaction fails.- Payouts settle asynchronously. Expect 30 seconds to 5 minutes for completion.
Receiving the result (callbackUrl)
Supply a callbackUrl in the request body. PalPluss will POST the transaction result to that URL when the payout reaches a terminal state (SUCCESS or FAILED).
Wallet requirements
Before initiating a payout, verify:- Your B2C wallet has enough balance for the payout amount
- Your service wallet has enough balance for the transaction fee
Failure and reversal
If M-Pesa declines or times out:- PalPluss automatically credits your B2C wallet back
- Your webhook receives
status: "FAILED"withresult_codeandresult_descfrom M-Pesa - The reversed transaction shows
status: "REVERSED" - Retry safely — the original transaction is not retried automatically
Authorizations
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>Body
Payout amount in KES. Minimum KES 10.
x >= 10500
Recipient M-Pesa phone number.
"0712345678"
Your reference for this payout (e.g. withdrawal ID).
"WD-2024-001"
Currency code. Currently only KES is supported.
Short description of the payout purpose.
"Commission payout"
Optional channel to use for this payout.
HTTPS URL to receive the payout result. PalPluss POSTs the terminal
transaction payload here when the status reaches SUCCESS or FAILED.
"https://yourserver.com/webhooks/b2c"
Response
Payout queued successfully. Transaction is in PENDING state.