What Daraja is, as documented by Safaricom
Daraja is Safaricom's developer platform for M-Pesa APIs. It is where businesses and developers register apps, obtain credentials and integrate M-Pesa transaction types into their own systems. Safaricom maintains the documentation, and it is the authoritative source for endpoints, parameters and onboarding steps.
Safaricom's documentation describes M-PESA Express (Lipa na M-PESA Online) as a prompt-style request started by a business. The customer receives a prompt on their phone and confirms the payment. In the market this is often called 'STK Push', a term that appears in Safaricom's documentation.
PayBill and Till are separate transaction types. With these, the customer starts the payment from their own phone using your business number, rather than responding to a prompt your system sends. Many businesses use more than one type, so it is worth confirming which ones your account is set up for.
What a payment gateway adds
A gateway sits between your website or app and M-Pesa. Payment Gateway Kenya is a payment gateway for M-Pesa pay-ins, plus payouts where confirmed for the account. In Kenya, the supported method is M-Pesa only.
Two connection routes
You connect by API (H2H) or by Hosted Payment Page. These are two ways into the same gateway, not separate products. H2H is a direct server-to-server connection and is not a white-label offering.
Postbacks with transaction status
Postbacks send transaction status to your system so you can update orders and records. They are not a customer notification service; messages to your customers remain your responsibility.
Three separate flows
Pay-in is when a customer pays you. Payout is when your business pays a customer, where confirmed for your account. Merchant settlement is when funds are sent to you. Each is handled and reported as its own flow.
Same-day settlement
Merchant settlements are sent on the same day (T+0). This describes when settlement is sent, not when funds are credited to your account.
Our overall transaction success rate is 85%, measured as successful transactions divided by all transactions. It is a product-wide figure, not a forecast for any single business. Existing merchants can add supported payment methods at no extra connection fee; the number of enabled methods does not change the connection price.
On the operational side, our internal practices include protection of API credentials, MFA and role-based access, business continuity planning and incident response. For anything beyond that, ask our team.
-
Illustrative flow: 1. Order created
Your system creates an order in KES and sends a payment request through the API (H2H), or redirects the customer to the Hosted Payment Page.
-
Illustrative flow: 2. Customer confirms
The customer confirms the M-Pesa payment on their phone.
-
Illustrative flow: 3. Status postback
A postback sends the transaction status to your system, which updates the order.
-
Illustrative flow: 4. Settlement
Merchant settlement runs as a separate flow from the customer's payment.
Comparison of responsibilities
The table below shows who typically handles each area. It describes responsibilities, not quality; either route can work well when the right team owns each part.
| Area | Direct with Daraja | Through Payment Gateway Kenya |
|---|---|---|
| Account and onboarding | Your business works with Safaricom on Daraja access and the transaction types you need. | You onboard with Payment Gateway Kenya; ask our team which steps apply to your business. |
| Integration work | Your developers build against Daraja endpoints as documented by Safaricom. | Your developers connect by API (H2H) or use the Hosted Payment Page. |
| Credentials | You store, rotate and protect your Daraja credentials. | You protect your gateway API credentials; we apply internal practices to protect API credentials on our side. |
| Payment types | You choose and implement M-PESA Express, PayBill or Till flows as Safaricom documents them. | M-Pesa pay-ins through the gateway; M-Pesa is the only supported method in Kenya. |
| Status handling | You receive and process Daraja callbacks and decide how to handle each outcome. | Postbacks send transaction status to your system; you update orders from them. |
| Customer messages | Your responsibility. | Your responsibility; postbacks are not a customer notification service. |
| Payouts | Depends on the Safaricom products and APIs set up for your account. | Available where confirmed for the account. |
| Settlement | Follows the terms of your Safaricom business account. | Merchant settlements are sent on the same day (T+0). |
| Pricing | Per Safaricom's terms for your account. | Custom / Talk to sales. |
Decision checklist
Work through these questions with your developers and finance lead. Your answers will usually point clearly to one route.
- Do you have developers who can build, test and maintain a Daraja integration, including callback handling?
- Would you rather redirect customers to a Hosted Payment Page than build payment screens yourself?
- Which M-Pesa transaction types do you need: M-PESA Express prompts, PayBill, Till, or a mix?
- Do you need to pay customers as well as collect from them? If so, confirm payout availability for your account.
- How does your finance team want pay-ins, payouts and merchant settlement reported: as one feed or as separate flows?
- Who in your business will own credential security, access control and incident response?
- Do you have compliance questions under the Central Bank of Kenya framework and the National Payment System Act 2011 that you need to raise with your advisers?
Frequently asked questions
Short answers to the questions merchants and developers ask most often when comparing Daraja with a gateway.
Is the Daraja API worse than using a payment gateway?
No. Daraja is Safaricom's own developer platform and is a valid way to accept M-Pesa. The choice is about who builds and maintains the integration, status handling and reporting, not about one route being better for every business.
What is the difference between M-PESA Express and PayBill or Till?
Safaricom's documentation describes M-PESA Express (Lipa na M-PESA Online) as a prompt-style request started by a business. PayBill and Till are separate transaction types where the customer starts the payment using your business number.
Is 'STK Push' a product name?
'STK Push' is a market term that appears in Safaricom's documentation for the prompt-style payment request. It is not a Payment Gateway Kenya product claim.
How do I connect to Payment Gateway Kenya?
You connect by API (H2H) or by Hosted Payment Page. These are two ways into the same gateway, not separate products. H2H is not white-label.
Do postbacks notify my customers?
No. Postbacks send transaction status to your system so you can update orders and records. Customer notifications remain your responsibility.
When are merchant settlements sent?
Merchant settlements are sent on the same day (T+0). This describes when settlement is sent, not when funds are credited to your account.
Which payment methods does Payment Gateway Kenya support in Kenya?
M-Pesa only. The offer covers M-Pesa pay-ins, plus payouts where confirmed for the account.
How much does the gateway cost?
Pricing is custom. Talk to sales for details for your business. Existing merchants can add supported payment methods at no extra connection fee; the number of enabled methods does not change the connection price.
