Daraja API
Also known as: Safaricom Daraja, M-PESA API, Daraja 2.0
Full definition
Daraja (Swahili for bridge) is Safaricom's official M-PESA developer platform, hosted at developer.safaricom.co.ke. Before Daraja, M-PESA integrations were bilateral partnerships with Safaricom; since 2017 any developer can self-serve, register an app in the sandbox, test against a sandbox short code, get an OAuth client, and then move to production once Safaricom approves the merchant KYC and short code.
The core endpoints are: STK Push (M-PESA Express) for customer-initiated pay, C2B for register-URL and validation-confirmation on paybill and till payins, B2C for business-initiated payouts to customer phones (used by insurers, betting operators, employers, and salary disbursements), B2B for business-to-business payouts, transaction status query, reversal, and account balance.
Daraja is the single most important layer for anyone building on M-PESA. Any e-commerce checkout, any subscription biller, any embedded finance product in Kenya that touches M-PESA is talking to Daraja. Rate limits, authentication (OAuth with a Consumer Key and Consumer Secret), and callback URL configuration are all documented on the Daraja portal.
Worked example
A merchant builds a Node.js app that: (1) calls the Daraja OAuth endpoint for an access token, (2) posts an STK Push request with the customer's MSISDN and the amount, (3) listens on a callback URL for the STK result, (4) writes the receipt into their order database.
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.