Skip to content

Latest commit

 

History

History
175 lines (120 loc) · 4.88 KB

File metadata and controls

175 lines (120 loc) · 4.88 KB

📢 Adams MPesa SDK - Now Available on npm! 🚀

I'm excited to announce the release of Adams MPesa SDK v1.0.0 - a modern, production-ready MPesa API wrapper for Node.js and TypeScript! 🎉

🔗 Links

✨ Key Features

Full TypeScript Support - Complete type definitions for all APIs
Production-Ready - Automatic retries, token caching, error handling
Easy to Use - Clean API with sensible defaults
Well Tested - 49 unit tests with comprehensive coverage
Express Middleware - Built-in callback handling
Security - Signature verification for webhooks
Lightweight - Only 21.3 kB package size

🚀 Quick Start

npm install adams-mpesa-sdk
import Mpesa from 'adams-mpesa-sdk';

const mpesa = new Mpesa({
  consumerKey: process.env.MPESA_CONSUMER_KEY,
  consumerSecret: process.env.MPESA_CONSUMER_SECRET,
  shortcode: process.env.MPESA_SHORTCODE,
  passkey: process.env.MPESA_PASSKEY,
  environment: 'sandbox', // or 'production'
});

// Initiate STK Push
const response = await mpesa.stkPush({
  amount: 100,
  phone: '254712345678',
  accountReference: 'ORDER-123',
  transactionDesc: 'Payment for Order #123',
});

console.log('Payment initiated:', response.CheckoutRequestID);

🎯 What Makes This Different?

Unlike other MPesa libraries, this SDK includes:

  • Express Middleware for callbacks - No more manual parsing!
  • Automatic Retries with exponential backoff for Safaricom downtime
  • Input Validation - Catches errors before they hit the API
  • Signature Verification - Protects against fake callbacks
  • Complete Examples - Express server, error handling, webhooks

📚 Documentation

Full documentation available in the GitHub README

🤝 Contributions Welcome!

This is an open-source project. Issues, PRs, and feedback are highly appreciated!


Built with ❤️ for Kenyan developers

📱 Social Media Posts

Twitter/X

🚀 Just published Adams MPesa SDK v1.0.0 to npm!

A modern, TypeScript-first MPesa API wrapper with: ✅ Express middleware ✅ Auto retries ✅ Signature verification ✅ 49 tests passing ✅ Only 21.3 kB

Install: npm install adams-mpesa-sdk

Docs: https://github.com/ADAMSmugwe/mpesa-API-wrapper-for-node.js

#NodeJS #MPesa #Kenya #JavaScript #TypeScript #OpenSource

LinkedIn

I'm excited to announce the release of Adams MPesa SDK v1.0.0! 🎉

After months of development and testing, I've published a production-ready MPesa API wrapper for Node.js that makes integrating Safaricom's Daraja API much easier.

🔑 Key Features: • Full TypeScript support with complete type definitions • Automatic retries with exponential backoff • Express middleware for callback handling • Webhook signature verification • Input validation to prevent common errors • 49 comprehensive unit tests • Lightweight (21.3 kB package size)

Whether you're building an e-commerce platform, SaaS application, or any payment system in Kenya, this SDK handles the complexity so you can focus on your product.

📦 Installation: npm install adams-mpesa-sdk

📚 Documentation & Examples: https://github.com/ADAMSmugwe/mpesa-API-wrapper-for-node.js

This is open source - contributions, feedback, and issues are welcome!

#NodeJS #MPesa #JavaScript #TypeScript #OpenSource #KenyanDevelopers #Fintech

Facebook / WhatsApp

🎉 New MPesa SDK Released! 🚀

I've just published adams-mpesa-sdk v1.0.0 to npm - a modern, production-ready MPesa API wrapper for Node.js!

Perfect for developers building payment systems in Kenya.

Features: ✅ TypeScript support ✅ Express middleware ✅ Auto retries ✅ Security features ✅ Well tested

Install: npm install adams-mpesa-sdk Docs: https://github.com/ADAMSmugwe/mpesa-API-wrapper-for-node.js

Open source and free to use! 🇰🇪


🎯 Communities to Share In

  1. Kenyan Developer Communities

    • Kenya Developers Community (Facebook)
    • Nairobi Tech Community
    • Silicon Savannah
  2. Reddit

    • r/node
    • r/javascript
    • r/typescript
    • r/Kenya
  3. Dev.to Write a blog post: "Building a Production-Ready MPesa SDK for Node.js"

  4. Hashnode Similar blog post with code examples

  5. Twitter/X Use hashtags: #NodeJS #MPesa #Kenya #JavaScript #TypeScript #100DaysOfCode

  6. Product Hunt (Later) After getting some traction and users


📊 Tracking Success

Monitor these metrics:


Good luck with your package! 🚀