Paystack in Kenya: M-Pesa, Pesalink and the Daraja Question
Paystack works in Kenya as a licensed payment aggregator. It accepts M-Pesa, Airtel Money, Visa/Mastercard, Apple Pay, Pesalink, and bank transfers through a single API. You send one Charge API request with provider set to "mpesa" and Paystack triggers the STK push on the customer's phone. Funds settle to your bank account or M-Pesa wallet.
What Paystack Supports in Kenya
Paystack launched in Kenya as a licensed payment service provider. For developers, that means one API integration gives you access to the payment methods Kenyan customers actually use.
Here is what you can accept through Paystack in Kenya today:
- M-Pesa. STK push to the customer's phone. They enter their PIN. You get paid. This is the payment method that matters most in Kenya. Paystack triggers the push through Safaricom's infrastructure, so the customer experience is the same as paying any other M-Pesa merchant.
- Airtel Money. Same flow as M-Pesa but for Airtel subscribers. The customer gets a USSD prompt on their phone. Smaller market share than M-Pesa, but ignoring it means turning away paying customers.
- Visa and Mastercard. Standard card payments. Paystack handles 3D Secure authentication. Useful for corporate clients, international customers, and anyone with a debit or credit card.
- Apple Pay. Available for customers with compatible Apple devices. Paystack surfaces Apple Pay as a payment option in the checkout flow when the customer's browser or device supports it.
- Pesalink. Real-time bank-to-bank transfers powered by the Kenya Bankers Association's Pesalink network. The customer authorizes the payment from their bank account. Good for high-value transactions where mobile money limits are a constraint.
- Bank Transfer. The customer transfers to a dedicated account number. Paystack reconciles the payment automatically. Useful for B2B invoices and larger amounts.
From your code, you do not build six separate integrations. You build one. Paystack's Transaction Initialize or Charge API accepts a channel parameter. You specify which methods to offer, and Paystack's checkout or your custom form handles the rest.
One detail that trips people up: M-Pesa through Paystack is not the same as direct M-Pesa through Daraja. The money flows through Paystack as the aggregator. The customer sees a Paystack-related paybill or shortcode on their phone, not your own paybill number. For most applications, this does not matter. For some, it does. That brings us to the question every Kenyan developer eventually asks.
The Daraja Question: When to Use Paystack vs Direct M-Pesa Integration
If you are building a product in Kenya that accepts payments, you will face this decision early: should you integrate M-Pesa directly through Safaricom's Daraja API, or use a payment gateway like Paystack?
This is not a theoretical question. It affects your costs, your development timeline, your reconciliation workflow, and your customer's checkout experience.
Choose direct Daraja when:
- M-Pesa is your only payment method and you do not need cards, Pesalink, or Airtel Money.
- You want your own paybill or till number visible on the customer's phone. This matters for brand trust in some industries.
- You need C2B, B2C, B2B, and account balance APIs with full control over every parameter.
- Transaction volume is high enough that the per-transaction fee difference adds up. Daraja has its own fee structure set by Safaricom. Paystack adds its own margin on top. At high volume, the difference matters.
- You already have a Safaricom business account and a development team comfortable with Daraja's callback model.
Choose Paystack when:
- You need to accept multiple payment methods (M-Pesa + cards + Pesalink) from one integration.
- You want a pre-built checkout page, a dashboard for your operations team, and automatic reconciliation.
- Development speed matters more than per-transaction cost. Paystack integration is genuinely faster than Daraja for most teams.
- You are building a product that will expand beyond Kenya. Paystack works in Nigeria, Ghana, South Africa, and other markets. Daraja is Kenya-only.
- You want built-in support for recurring payments, split payments, and transfer payouts without building them yourself.
The hybrid approach: Some teams run both. They use Paystack for the checkout (cards, Pesalink, small M-Pesa amounts) and direct Daraja for high-volume M-Pesa use cases like bulk disbursements. This adds complexity, but it is a legitimate pattern. We cover it in detail in Running Paystack and Daraja Side by Side.
There is no universally correct answer. The right choice depends on your product, your team, and your transaction profile. The articles in this cluster cover both paths so you can make an informed decision for your specific situation.
Accepting M-Pesa Through Paystack
The fastest way to accept M-Pesa through Paystack is the Charge API. You send a POST request with the customer's phone number and the amount. Paystack sends an STK push to the customer's phone. The customer enters their M-Pesa PIN. Paystack sends you a webhook when the charge succeeds or fails.
Here is the basic flow in Node.js:
// Step 1: Initialize the M-Pesa charge
const response = await fetch('https://api.paystack.co/charge', {
method: 'POST',
headers: {
Authorization: 'Bearer sk_live_YOUR_SECRET_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
email: 'customer@example.com',
amount: 150000, // Amount in kobo/cents. 150000 = KES 1,500
currency: 'KES',
mobile_money: {
phone: '0712345678',
provider: 'mpesa',
},
}),
});
const data = await response.json();
// data.status === true means the charge was initiated
// data.data.status will be 'pay_offline' (the customer needs to complete on their phone)
console.log(data.data.reference); // Save this reference
A few things to note:
- Amount is in cents. KES 1,500 is sent as
150000. This catches people the first time. - Currency must be KES. Paystack uses the currency to determine which mobile money providers are available.
- The phone number format should be the local Kenyan format (
07XXXXXXXXor01XXXXXXXX) or the international format (2547XXXXXXXX). Check Paystack's docs for the exact format they expect, as it can change. - The charge is asynchronous. After you call the endpoint, the customer gets a push on their phone. You do not get the final result in the HTTP response. You get it through a webhook.
Your webhook handler needs to listen for the charge.success event:
// Express webhook handler (simplified)
app.post('/webhooks/paystack', express.json(), (req, res) => {
const hash = crypto
.createHmac('sha512', process.env.PAYSTACK_SECRET_KEY)
.update(JSON.stringify(req.body))
.digest('hex');
if (hash !== req.headers['x-paystack-signature']) {
return res.status(401).send('Invalid signature');
}
const event = req.body;
if (event.event === 'charge.success') {
const { reference, amount, currency } = event.data;
// Verify the amount matches what you expected
// Update your database
// Send the customer a confirmation
console.log('Payment confirmed:', reference, amount, currency);
}
res.status(200).send('OK');
});
Always verify the webhook signature. Always check the amount and currency in the webhook match what you expected. Never trust the client side alone. These are not suggestions. Skipping them is how you lose money.
For a deeper look at the Charge API specifically, see Accepting M-Pesa Payments with the Paystack Charge API. For the Checkout (popup) approach instead of the Charge API, see Accepting M-Pesa Payments Through Paystack Checkout.
Paystack Transfers to M-Pesa, Paybills, and Bank Accounts
Accepting money is half the story. The other half is sending it out. In Kenya, Paystack Transfers let you move money from your Paystack balance to three destinations:
- M-Pesa wallets. Send money directly to a customer's or supplier's M-Pesa number. This is how you handle refunds, payouts to gig workers, or disbursements to field agents.
- Bank accounts. Transfer to any Kenyan bank account using the bank code and account number. Standard for salary payments, vendor settlements, and B2B payouts.
- Paybill and till numbers. Pay other M-Pesa merchants programmatically. Useful if your system needs to pay a utility company, a supplier with a paybill, or another business's till.
The Transfer API flow works like this:
- Create a transfer recipient. This registers the destination (phone number, bank account, or paybill) with Paystack. You do this once per recipient.
- Initiate a transfer. Specify the recipient code, amount, and reason. Paystack processes the transfer from your balance.
- Listen for the webhook. The
transfer.successortransfer.failedevent tells you the outcome.
// Create a mobile money transfer recipient
const recipientRes = await fetch('https://api.paystack.co/transferrecipient', {
method: 'POST',
headers: {
Authorization: 'Bearer sk_live_YOUR_SECRET_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
type: 'mobile_money',
name: 'Jane Wanjiku',
account_number: '0712345678',
bank_code: 'MPESA',
currency: 'KES',
}),
});
const recipient = await recipientRes.json();
const recipientCode = recipient.data.recipient_code;
// Initiate the transfer
const transferRes = await fetch('https://api.paystack.co/transfer', {
method: 'POST',
headers: {
Authorization: 'Bearer sk_live_YOUR_SECRET_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
source: 'balance',
amount: 50000, // KES 500 in cents
recipient: recipientCode,
reason: 'Rider payout for July 20',
}),
});
const transfer = await transferRes.json();
console.log(transfer.data.transfer_code);
A few practical notes for Kenya:
- You need to enable transfers on your Paystack account. This is not on by default. Contact Paystack support or check your dashboard settings.
- Transfer fees apply. Check paystack.com/pricing for current rates. [TODO: verify current figure on paystack.com/pricing]
- There are daily and per-transaction transfer limits. These depend on your account tier and verification level.
- Transfers to M-Pesa wallets arrive quickly, but the exact timing depends on Safaricom's processing. Do not promise "instant" to your users.
For the full breakdown, see Paystack Transfers to M-Pesa Wallets Explained and Paystack Transfers to Paybill and Till Numbers.
Pay with Pesalink on Paystack
Pesalink is the real-time interbank payment network run by the Kenya Bankers Association. It lets customers pay directly from their bank account without a card. The money moves between banks in real time, 24 hours a day, seven days a week.
Why does Pesalink matter for developers? Two reasons:
- Higher transaction limits than M-Pesa. M-Pesa has a per-transaction cap (currently KES 150,000 for most users). Pesalink supports larger amounts, making it suitable for rent payments, school fees, wholesale orders, and other high-value transactions.
- Bank account customers. Some customers prefer to pay from their bank account directly. Corporate buyers, in particular, often want a bank-to-bank payment option.
On Paystack, Pesalink appears as a payment channel. When you initialize a transaction or use the Paystack Checkout popup, you can include bank_transfer or the Pesalink-specific channel in the list of allowed channels. The customer selects Pesalink, chooses their bank, and authorizes the payment from their banking app or USSD.
From the developer's perspective, the integration code does not change much. You initialize the transaction with KES as the currency and include the relevant channel. Paystack handles the Pesalink connection, the bank authorization flow, and the confirmation. You receive the same charge.success webhook regardless of whether the customer paid with M-Pesa, a card, or Pesalink.
That uniformity is one of the real advantages of using a gateway. Your backend does not care which payment method the customer chose. The webhook payload structure is the same. Your reconciliation logic is the same.
For the full integration walkthrough, see Pay with Pesalink on Paystack: Developer Guide.
Settlement in Kenya
Settlement is when the money your customers paid actually arrives in your account. This is where many developers get surprised, because there is a gap between "customer paid" and "you have the money."
In Kenya, Paystack settles to:
- Your bank account. Paystack sends your accumulated balance to the bank account you registered during onboarding. This is the default settlement method.
- Your M-Pesa wallet. Some merchant accounts can receive settlement directly to an M-Pesa number. Check with Paystack whether this option is available for your account type.
Settlement timing varies. Paystack publishes settlement schedules on their website, but the actual timing depends on your account type, your transaction volume, and the payment method used. [TODO: verify current figure on paystack.com/pricing]
What you need to know as a developer:
- Settlement is not instant. A customer paying you via M-Pesa at 10 AM does not mean you have that money at 10:01 AM. The money sits in Paystack's pool account until the next settlement cycle.
- Weekends and holidays affect timing. Bank settlements typically process on business days. If a settlement falls on a Saturday, you may not see it until Monday.
- Fees are deducted before settlement. What you receive is the transaction amount minus Paystack's fees. Your reconciliation logic needs to account for this.
- Failed settlements happen. If your bank account details are wrong, or the bank rejects the deposit for any reason, the settlement fails. Monitor the
transfer.failedevents and keep your banking details current. - You can view settlement reports in the Paystack dashboard. These reports break down every transaction in each settlement batch, making reconciliation much easier than doing it manually with M-Pesa statements.
For a deeper look at settlement mechanics, see Paystack Kenya Settlement to Bank or M-Pesa Wallet.
Kenya-Specific Considerations
Building payment integrations in Kenya is not the same as building them in the US or Europe. The regulatory environment, the infrastructure, and the customer expectations are different. Here is what you need to think about.
CBK Regulations
The Central Bank of Kenya regulates payment service providers under the National Payment System Act. Paystack is licensed, so you do not need your own PSP license just to use their API. But you do need to understand the rules that affect your product. For example, there are regulations around how you store payment data, how you handle customer disputes, and what disclosures you need to make. See CBK Payment Service Provider Rules Developers Should Know.
KRA eTIMS
The Kenya Revenue Authority's electronic Tax Invoice Management System (eTIMS) requires businesses to generate electronic tax invoices for every sale. If your application processes payments, you likely need to integrate with eTIMS to generate compliant invoices. This is separate from Paystack, but your payment flow needs to account for it. Every successful payment should trigger an eTIMS invoice. See KRA eTIMS and Payment Receipt Integration Considerations.
Data Protection Act
Kenya's Data Protection Act (2019) governs how you collect, process, and store personal data, including payment data. Phone numbers, email addresses, and transaction histories are personal data. You need a privacy policy, you need consent, and you need to store data securely. Paystack handles the card data (they are PCI DSS compliant), but you are responsible for the customer data in your own database.
Digital Service Tax
If your product is a digital service, you may be subject to Kenya's Digital Service Tax. This applies to services delivered over the internet. The tax is collected at the point of payment in some cases. Your accounting team needs to understand whether your product falls under this category. See Kenya Digital Service Tax and Online Payment Products.
Network Conditions
Kenyan internet is good in Nairobi, Mombasa, and other major towns. It is less reliable in rural areas. And even in the city, mobile data connections drop. Your payment integration needs to handle:
- Timeouts on the STK push. The customer's phone might not receive the push immediately.
- Webhook delivery failures. If your server is briefly unreachable, Paystack will retry, but you need idempotent handling.
- Double-submission prevention. A customer on a slow connection might tap "Pay" twice.
- Offline-first patterns for mobile apps used in areas with intermittent connectivity.
These are not edge cases in Kenya. They are the normal operating conditions for a significant portion of your users. Build for them from day one. For implementation patterns, see Building for Kenyan Network Conditions: Retries and Timeouts.
Every Article in the Kenya Cluster
This hub article is the starting point. The articles below go deeper into each topic. They are organized by category: overviews and comparisons, M-Pesa and Daraja specifics, other payment methods, transfers and payouts, real-world build guides, alternative channels, and regulatory considerations.
Overviews and Comparisons
- Paystack in Kenya: What It Supports and What It Does Not
- Paystack vs Daraja: When to Use a Gateway and When to Go Direct
- Choosing Between Paystack, IntaSend, PesaPal, and Flutterwave in Kenya
- Why Kenyan Checkout Conversion Depends on Mobile Money Placement
M-Pesa and Daraja
- M-Pesa Through Paystack vs Direct Daraja STK Push
- Accepting M-Pesa Payments Through Paystack Checkout
- Accepting M-Pesa Payments with the Paystack Charge API
- C2B, B2C, and B2B in Daraja Terms vs Paystack Terms
- M-Pesa STK Push Timeout Handling Compared Across Providers
- Running Paystack and Daraja Side by Side
- Migrating from Direct Daraja to Paystack
- Migrating from Paystack to Direct Daraja
- Building an M-Pesa Fallback When Paystack Is Unavailable
- Reconciling M-Pesa Payments Received Through Paystack
- Paystack Callback Handling for Kenyan Mobile Money
Other Payment Methods
- Pay with Pesalink on Paystack: Developer Guide
- Airtel Money Through Paystack in Kenya
- Apple Pay for Kenyan Merchants on Paystack
Transfers and Payouts
- Paystack Kenya Settlement to Bank or M-Pesa Wallet
- Paystack Transfers to M-Pesa Wallets Explained
- Paystack Transfers to Paybill and Till Numbers
Build Guides: Real Kenyan Products
- Building a Kenyan E-Commerce Checkout That Accepts M-Pesa and Cards
- Building a Kenyan SaaS Subscription Billing System
- Building a Matatu or Transport Fare Collection System
- Building a Boda-Boda Rider Payout System
- Building a Chama Contribution Tracker with Payments
- Building a SACCO Loan Repayment Collection System
- Building a School Fees Portal for a Kenyan School
- Building a Hospital Bill Payment System in Kenya
- Building an Agrovet or Farm Input Payment System
- Building a Kenyan Utility Bill Payment Integration
- Building a Rent Collection Platform for Kenyan Landlords
- Building a Church or Mosque Contributions Platform
- Building an Event Ticketing Platform for Kenyan Events
- Building a Salon and Barbershop Booking and Payment App
- Building a Kenyan Delivery App with Rider Payouts
- Building a Digital Content Paywall for Kenyan Readers
- Building a Freelancer Invoicing Tool for Kenyan Developers
- Build a Home Services Booking Marketplace
Alternative Channels
- USSD Plus Paystack: Reaching Feature Phone Users
- WhatsApp Commerce Plus Paystack Payment Links
- WhatsApp Bot That Collects Payment via Paystack
Regulatory and Compliance
Learn the African Stack
This article and the 45 articles linked above exist because Paystack-in-Kenya is not a footnote. It is the core of what many developers here build every day. M-Pesa, Daraja, STK push, paybill, till number, Pesalink, eTIMS. These are not exotic technologies. They are the stack.
McTaba teaches this stack. Not as a side topic. As the main thing.
The McTaba M-Pesa/Daraja micro-course is a four-week guided cohort. KES 20,000, live sessions, project reviews, and a shippable deliverable. The full KES 20,000 applies as credit toward the 26-week bootcamp if you continue.
You build a working payment integration that handles STK push, callbacks, reconciliation, and error recovery. Not a tutorial project. A production-ready one. The kind you would put in front of actual customers.
If you want the full picture, the 26-week Full-Stack Software and AI Engineering bootcamp (KES 120,000) covers payments as part of a complete engineering education. You ship real products that accept real money.
Key Takeaways
- ✓Paystack supports six payment methods in Kenya: M-Pesa, Airtel Money, Visa/Mastercard, Apple Pay, Pesalink, and bank transfer. One integration covers all of them.
- ✓The Daraja question comes down to control vs speed. Direct Daraja gives you raw access to M-Pesa APIs with no middleman fee. Paystack gives you multi-method checkout, a dashboard, reconciliation tools, and faster integration at the cost of a per-transaction fee.
- ✓To accept M-Pesa through Paystack, you call the Charge API with provider set to "mpesa" and pass the customer's phone number. Paystack triggers the STK push. The customer enters their PIN and you get a webhook when it completes.
- ✓Paystack Transfers let you send money from your Paystack balance to M-Pesa wallets, bank accounts, and paybill numbers in Kenya. This powers payouts, refunds, and disbursements.
- ✓Kenyan developers must account for CBK payment regulations, KRA eTIMS requirements, the Data Protection Act, and unreliable network conditions. These are not optional extras. They affect how you build.
Frequently Asked Questions
- Is Paystack licensed to operate in Kenya?
- Yes. Paystack is a licensed payment service provider in Kenya. They operate under the regulatory framework set by the Central Bank of Kenya. You do not need your own PSP license to accept payments through their API.
- Can I accept M-Pesa payments through Paystack without my own paybill number?
- Yes. When you use Paystack, the M-Pesa payment goes through Paystack's paybill infrastructure. You do not need your own Safaricom paybill or till number. The customer sees a Paystack-related shortcode on their phone during the STK push, not your own business number.
- What are Paystack's transaction fees in Kenya?
- Paystack publishes its pricing on paystack.com/pricing. Fees vary by payment method (M-Pesa, cards, bank transfer) and may include percentage-based charges and flat fees. Check the pricing page for current rates, as they update periodically. [TODO: verify current figure on paystack.com/pricing]
- Can I use Paystack and Daraja at the same time in the same application?
- Yes. Some teams use Paystack for multi-method checkout (cards, Pesalink, and smaller M-Pesa payments) and direct Daraja for high-volume M-Pesa operations like bulk B2C disbursements. This adds complexity to your codebase and reconciliation, but it is a legitimate pattern used in production by several Kenyan companies.
- How long does Paystack settlement take in Kenya?
- Settlement timing depends on your account type, transaction volume, and payment method. Paystack publishes settlement schedules on their website. Settlements typically process on business days, so payments received on weekends may not settle until the following week. Check your Paystack dashboard or contact their support for the schedule that applies to your account. [TODO: verify current figure on paystack.com/pricing]
- Does Paystack support recurring M-Pesa payments in Kenya?
- Paystack supports recurring payments (subscriptions) through their Plans and Subscriptions API. For card payments, subsequent charges happen automatically. For M-Pesa, the customer may need to authorize each payment via STK push, since M-Pesa does not support automatic direct debits the way cards do. Your subscription logic needs to handle the case where a customer misses or declines a recurring M-Pesa charge.
Ready to build real-world apps?
Join the McTaba Labs full-stack marathon (4 months full-time · 6 months part-time). Learn M-Pesa, USSD, and WhatsApp engineering while shipping 8 production apps.
Apply to the McTaba Marathon