Integrate STK Pushes and automated B2C withdrawals into your app in minutes using the syncpesa-connect SDK. One flat 2.8% fee. Zero Safaricom paperwork.
API Calls Processed
Active Developers
KES Volume Settled
% Uptime SLA
We abstract away the complexities of Daraja, SSL certificates, and network timeouts so you can focus on building your product.
No more raw fetch requests or messy headers. Install syncpesa-connect and initialize payments in exactly 3 lines of Javascript.
Zero setup fees. Zero monthly hosting fees. We take a flat 2.8% cut at the gateway level to cover carrier costs, passing the remaining liquidity directly to you.
Network glitch? Pass an idempotencyKey in your payload. Our state machine ensures a user is never double-charged, even if they hit the pay button twice.
Receive instant JSON payloads when a transaction settles. Every webhook is cryptographically signed with HMAC-SHA256 so you can verify its authenticity.
Don't want to deal with Webhooks? Use our built-in getTransactionStatus() method to poll the server securely and verify if a payment succeeded.
Enable Auto-Sweep in your developer dashboard to have net API funds automatically forwarded to your designated M-Pesa number instantly.
We provide a fully typed, promise-based Node.js SDK. No more manual header formatting or complex REST wrappers.
npm install syncpesa-connect
Initialize the client with your live or test key. Call `initiateCheckout` to immediately trigger a Safaricom STK push on the user's phone.
const SyncPesaConnect = require('syncpesa-connect'); // Initialize the client const syncpesa = new SyncPesaConnect('sp_live_YOUR_API_KEY', 'production'); async function chargeUser() { try { const response = await syncpesa.initiateCheckout({ amount: 1500, phone: '254712345678', externalReference: 'ORDER-90210' }); console.log('Prompt Sent!', response.data.checkoutRequestId); return response.data.checkoutRequestId; } catch (error) { console.error(error.message); } }
You don't need a webhook server. Simply pass the checkoutRequestId returned from step 2 to check if the user entered their PIN successfully.
async function verifyPayment(checkoutId) { try { const status = await syncpesa.getTransactionStatus(checkoutId); if (status.data.status === 'SUCCESS') { console.log('Payment Secured! Receipt:', status.data.receipt_code); console.log('Net amount earned:', status.data.net_amount); } else if (status.data.status === 'FAILED') { console.log('User cancelled the prompt or entered wrong PIN.'); } else { console.log('Still pending. Check again in 2 seconds...'); } } catch (error) { console.error('Verification failed:', error.message); } }
Send a test STK push directly from your browser right now.
No hidden Safaricom tariff math. Just one flat percentage.
| Gateway Provider | Transaction Fee | Native M-Pesa | Instant B2C Payouts |
|---|---|---|---|
| SyncPesa Connect | 2.8% Flat | ||
| Stripe / Global Cards | 2.9% + KES 30 | ||
| Flutterwave | 2.9% + KES 30 | ||
| Direct Daraja (Safaricom) | Complex Tiers + KES 30k Setup |
On a KES 5,000 payment, you save exactly KES 35.00 per transaction compared to Stripe.
To prevent credential scraping and unauthorized gateway access, SyncPesa Connect API keys cannot be generated on the web. You must download the official SyncPesa mobile application, complete identity verification, and provision keys securely from the Developer Portal.
Yes! Our official SDK is available on NPM. Simply run npm install syncpesa-connect. It handles authentication, STK pushes, balance checking, and B2C withdrawals with fully typed promises.
The flat 2.8% fee covers Safaricom carrier charges (which vary wildly), our server infrastructure, security monitoring, webhook delivery, and 24/7 uptime maintenance. There are no hidden setup fees or monthly subscriptions.
If you enable Auto-Sweep in your Developer Dashboard, net funds are B2C transferred to your registered M-Pesa number the absolute second the STK push succeeds. If manual, you can withdraw anytime via the API or App.
Yes! We provide test API keys (sp_test_xxx) that connect directly to our sandbox routing engine. You can safely build and test your integration before going live.
Download the SyncPesa app to verify your identity, access the Developer Portal, and generate your production API keys.
Developer Assistant
Hello Developer! I am J.A.R.V.I.S. I can assist you with integrating the syncpesa-connect NPM package, webhook verification, or understanding the 2.8% fee architecture. How can I help?