C2B
Also known as: Customer to Business, C2B API, M-PESA C2B
Full definition
C2B is the Daraja API for the direction of money from a customer into a merchant paybill or till. It is the counterpart of B2C (money from a business out to a customer). A merchant registers two callback URLs with Safaricom: a Validation URL and a Confirmation URL.
When a customer initiates a payment to the merchant's paybill or till (either via the M-PESA menu themselves, or triggered by an STK Push), Safaricom optionally hits the Validation URL first. If the merchant returns Accepted, Safaricom completes the transaction and hits the Confirmation URL with the final receipt. If Validation returns Rejected, Safaricom reverses the transaction and returns the money to the customer.
The Validation URL is what serious billers (universities, utilities, government) use to reject payments with a wrong account number before the money leaves the customer's wallet. Most Kenyan billers only implement Confirmation, which means bad-account payments land in a holding account and need manual reconciliation.
Worked example
A university configures its paybill 123456 in Daraja with a Validation URL and a Confirmation URL. A student pays KES 20,000 to 123456 with account = their registration number. Safaricom calls the Validation URL, the university confirms the reg number is valid, Safaricom completes, then Safaricom calls the Confirmation URL with the M-PESA receipt so the student's fee balance updates immediately.
Verified 2026-09-01. Definitions on paybillke are sourced from Safaricom PLC Annual Report FY2026, the Central Bank of Kenya, the Communications Authority of Kenya, the Kenya Revenue Authority, and the primary operator documentation for each product. How we verify. Report a change.