Paying staff or customers through M-Pesa B2C
How a Kenyan business pays salaries, commissions or refunds to M-Pesa numbers through B2C: the account, limits, funding and avoiding double pay.
By Achekam · · 4 min read · For Running a business businesses in Kenya
Casual pickers paid at the end of a harvest week. Field agents waiting for their commission. A customer owed money back after a cancelled order. In Kenya the most practical account for all of them is often the M-PESA number on their phone, not a bank account.
Safaricom's business-to-customer service, known as B2C, is built for exactly this kind of payment. It comes with its own account structure, limits and controls, and with a few ways to go wrong that are expensive to undo. This article covers what a business needs before its first B2C payday and how to run each one safely.
What B2C is used for
Safaricom describes its M-PESA Bulk Payment (B2C) service as a way for an organisation to pay individuals' mobile phones from an M-PESA short code in real time, giving salary, dividend and SACCO payments as examples. Its developer documentation for the B2C API lists bulk disbursements from a business to customers' M-PESA numbers, such as salary payments, cashback, promotions, winnings and loan disbursements.
Customer refunds are not named in those lists, but they are the same movement of money: from the business to a person's M-PESA number. When you apply, describe all the payments you intend to make so Safaricom can confirm they fit.
A Bulk Disbursement Account or a one-account short code
Safaricom says a business that wants to use the B2C API in production must either apply for a Bulk Disbursement Account and obtain a B2C short code, or convert its pay bill or till number to a one-account short code that can both receive and disburse.
The choice is partly about control. A separate disbursement account keeps money coming in apart from money going out, which makes reconciliation cleaner. A single account is simpler to run but mixes the two flows. Discuss both with Safaricom and your accountant before applying.
For the integration itself, Safaricom says the B2C API user needs the ORG B2C API initiator role, and that no passkey is needed for B2C, because the passkey is used only for M-PESA Express (STK push).
Minimum and maximum per payment
Safaricom says B2C transactions must be at least Ksh 10 and at most Ksh 250,000 per transaction, and that a customer's maximum account balance and daily transaction value are Ksh 500,000.
Those limits shape a payday. A senior employee's net pay above the per-transaction ceiling cannot go in a single B2C payment, and splitting salaries to get round a limit invites confusion; pay those employees by bank instead. A recipient whose M-PESA balance is already near its ceiling may not be able to receive the payment at all, so expect the occasional failure and have a fallback ready. Check the limits on Safaricom's page before each change to your process, as they can change.
Funding the utility account with maker-checker
Safaricom says B2C payments debit the Utility account, so funds must first be moved there from the MMF or Working account, either by a portal operator with a second approver or through the B2B API.
Build that step into the payroll timetable. If payday is the last working day, fund the utility account the day before, with one person initiating the transfer and another approving it. A payout that fails because the utility account was empty is avoidable; the two-person transfer also means nobody can quietly move money into the disbursement account alone. Who holds which role is covered in M-PESA portal roles and two-person control.
Unique IDs to avoid paying twice
Safaricom says every B2C request should carry a unique OriginatorConversationID generated by the business, to avoid double disbursement, and that the ID can be used to query a transaction's status before paying again.
This matters because B2C results come back asynchronously. When a result is slow, the temptation is to send the payment again. Do not. Query the original transaction by its ID first; checking whether an M-Pesa transaction completed explains how.
The reason for caution is that mistakes are hard to reverse. Safaricom says B2C transactions cannot be reversed through the Reversal API and must be reversed manually on the M-PESA portal.
Achekam's payment schedule records pay but moves no money
In Achekam, each approved pay run has a payment schedule that can be downloaded as CSV. Marking the run paid only records the fact: Achekam moves no money, and it does not send B2C payments.
Two related limits apply in Kenya. No bank-file layout for a Kenyan bank ships today, and every payment in a bank file needs a six-digit branch code, so bank-paid staff are also paid outside Achekam from the schedule. And Achekam does not refund or reverse M-Pesa payments: a refund is made in the business's M-PESA org portal and then recorded in Achekam by a person.
Used that way, the payment schedule is the agreed list of who should be paid what. The B2C payments are made through Safaricom, and the run is marked paid only once the results confirm every payment went through.
A B2C payday, step by step
- Approve the pay run in Achekam and download the payment schedule.
- Check every amount against the B2C limits, and move larger payments to bank transfer.
- Fund the utility account, with one person initiating and a second approving.
- Send each payment with its own unique OriginatorConversationID.
- Match every result to the schedule; query any payment without a result before doing anything else.
- Follow up failed payments individually, by M-PESA again or by bank.
- Mark the run paid in Achekam and file the results with the payroll records.
For the wider picture of what Kenyan and Nigerian payroll still has to do by hand, see payroll gaps in Nigeria and Kenya.
Safaricom's B2C API page sets out how bulk disbursements to M-PESA customers work, the integration steps and the go-live process.
General guidance only, not advice on your own circumstances. Tax and payroll rules change: check the current position with the authority or your adviser.