🎉 7 Years Later: Major Update to M-Pesa STK Ruby Gem 🎉 Back in 2018, I started building a simple Ruby gem to integrate M-Pesa STK Push payments. It was born out of frustration with the complexity of integrating Safaricom's APIs - I wanted something simple, clean, and Ruby-friendly. What started as a weekend project to solve my own problem has grown into something much bigger. Today, I'm excited to announce version 2.0.0 - a complete overhaul that transforms the gem from a simple STK Push tool into a comprehensive M-Pesa API integration library! 🚀 What's New in 2.0.0: ✨ 11 New API Endpoints: • Transaction Status Query • STK Push Query • B2C & B2B Payments • C2B Registration & Simulation • Account Balance Query • Transaction Reversal • M-Pesa Ratiba (Standing Orders) • IoT SIM Management & Messaging • IMSI/SWAP Operations • Pull Transactions, Which are compatible with #Daraja3 📚 Comprehensive Documentation: • Complete API reference with examples • Callback handling guides for all endpoints • Rails & Sinatra implementation examples • Best practices and troubleshooting ✅ Production Ready: • 148 comprehensive tests (all passing!) • Full RuboCop compliance • Ruby 3.3+ compatibility • Enhanced error handling • Complete callback documentation The Journey: From a simple gem with one feature to a comprehensive solution covering the entire M-Pesa API ecosystem. This update represents hundreds of hours of development, testing, and documentation - all to make M-Pesa integration easier for Ruby developers. Why This Matters: M-Pesa is the backbone of digital payments in Kenya and beyond. By making these APIs more accessible to Ruby developers, we're enabling more businesses to integrate digital payments seamlessly. Try it out: Check out the full documentation: https://lnkd.in/dSfCyqeN Huge thanks to Ceciliah Mbugua & Kushal Patel for the collaboration and guidance and to everyone who's used, contributed to, or provided feedback on this gem over the years! 🙏 #Ruby #Mpesa #FinTech #OpenSource #RubyOnRails #Kenya #DigitalPayments #APIIntegration #SoftwareDevelopment #DarajaAPI
M-Pesa STK Ruby Gem Updated to 2.0.0 with 11 New Endpoints
More Relevant Posts
-
Recently, I ran into a performance issue where an API was returning too much data in a single response. What looked fine during development became a problem as the data grew 📉. The fix was simple but important: * Added proper pagination to limit response size 📄 * Applied filtering to fetch only relevant records 🔍 * Implemented sorting for consistent and predictable results ↕️ This small change: * Reduced response time * Lowered database load * Made the API easier for the frontend to consume It was a good reminder that real-world bugs often come from missing fundamentals, not complex logic 💡. Designing APIs with growth in mind saves time, effort, and future issues. 💬 Have you faced performance issues due to unpaginated APIs? #WebDevelopment #BackendDevelopment #API #Laravel #Django #CleanCode #CareerGrowth
To view or add a comment, sign in
-
-
🔧 Built a Message-Driven Backend System (LedgerPay) I recently completed LedgerPay, a backend-only transactional order & payment processing system built to explore how real production systems handle reliability, async workflows, and failure scenarios. Instead of focusing on CRUD or UI, the goal was to design a system where: API responsiveness is preserved Side effects are isolated Failures don’t corrupt state 🧠 Design decisions & architecture Command-driven API: POST /api/orders accepts intent, not execution Async processing via RabbitMQ to decouple request handling from payment execution Background workers responsible for side effects and retries PostgreSQL + EF Core for strong transactional guarantees Redis-backed idempotency to handle duplicate requests safely Clean Architecture to enforce dependency direction and testability ⚖️ Trade-offs explored Async payments → delayed confirmation but higher resilience Explicit workers → operational complexity but better fault isolation Strong consistency → lower throughput but predictable behavior 🔍 What I focused on Correctness under failure (worker restarts, message redelivery) Clear ownership of responsibilities (API vs worker) Explicit configuration for multi-process systems Avoiding infrastructure leakage into business logic This project helped reinforce how real backend systems are structured, beyond frameworks and syntax. 📌 Repo: https://lnkd.in/gmKCVr3b Happy to discuss design choices, improvements, or alternative approaches. #BackendEngineering #SystemDesign #DistributedSystems #DotNet #RabbitMQ #Redis #PostgreSQL #CleanArchitecture #SoftwareEngineering
To view or add a comment, sign in
-
The Integration Tax You're Paying With Every Request 💸 "Purpose-built" sounds elegant. One specialized tool for each job. In practice? Your application is playing telephone across network boundaries. And the meter is running. The AWS approach: 🧩 → DynamoDB for transactional data → OpenSearch for search → Neptune for graph → Lambda to glue it all together The cost? API Gateway alone can burn 100ms to invoke a Lambda. An empty SQS queue can take a minute or longer to deliver a message. 100ms here, 200ms there — it all adds up. Multiple APIs. Multiple consistency models. One exhausted team holding it together with duct tape and prayers. The Atlas approach: 🎁 Same promise, better delivery. One API. One SDK. But unwrap the box? Lucene runs in a separate process. MongoDB documents it: "Atlas Search indexes are updated in a separate process, maybe even on separate hardware via a network hop." The result: ~1 second indexing latency. Your document is committed but unsearchable. Your user is confused. Your support team is fielding tickets. When milliseconds matter, eventual consistency isn't a feature. It's a liability. ⚠️ --- Here's the thing — a unified API is the right answer. 🎯 Developers shouldn't juggle five SDKs and five consistency models. That battle is an easy win. But here's what really matters: what's behind that API changes everything. Wrapping third-party tech in a nice API doesn't change the physics. You still get: → IPC overhead on every cross-engine call → Data sync lag you can't engineer away → Consistency boundaries you have to account for in code → Multiple query optimizers that have never met each other An elegant API over a fragmented backend is still a fragmented backend. 🪞 --- Oracle built something different. 🏗️ JSON, Graph, Vector, Spatial, Full-Text Search — not bolted on. Not synced from logs. Not translated across third-party APIs. Native. Same engine. Same memory. Same transaction. Same cost-based optimizer. When you query documents, join to relational data, and run vector similarity in a single statement? ✅ One execution context ✅ Zero network hops ✅ Zero serialization overhead ✅ Immediate consistency ✅ One optimizer that sees the entire query Not a wobbly tower of technology. Not even elegantly integrated functional silos. No silos at all. --- A unified API reduces developer friction. ✅ A unified engine eliminates the integration tax entirely. ✅✅ Only one provider ships both. And it's not the one you'd expect from the 2015 conversation. --- Still paying per-request tolls to move data between systems you already own? Reach out to your Oracle account team. Ask them about Oracle 26ai's converged architecture. Ask what consolidation actually looks like. The answer might surprise you — and your CFO. 📉 --- #Oracle #Database #MongoDB #AWS #DeveloperExperience #DataArchitecture #Performance #EnterpriseArchitecture #CloudCosts #DatabaseStrategy
To view or add a comment, sign in
-
Worked hands-on with Prisma ORM to design and manage relational databases and integrate them with a Node.js backend. ✔️ Designed Prisma models & ran migrations ✔️ Created and used Prisma Client ✔️ Implemented relations (1–1, 1–N, N–N) & enums ✔️ Built full CRUD operations ✔️ Worked with advanced queries, filtering & relational data Prisma’s type-safe approach makes backend development cleaner, faster, and more reliable—perfect for building scalable APIs. 📌 Building structured, production-ready backends. #Prisma #BackendDevelopment #NodeJS #TypeScript #Databases #APIs #FullStackDeveloper
To view or add a comment, sign in
-
-
Project Spotlight: GST Invoice Generator Excited to share my recent project — a GST Invoice Generator designed to simplify invoice creation and management for businesses. 🔹 Built a secure full-stack system with role-based authentication 🔹 Implemented Admin Dashboard to manage users, invoices & analytics 🔹 Integrated real-time invoice tracking and data visualization 🔹 Successfully generated ₹9,999 in revenue during testing phase 💰 🔹 Focused on clean UI, scalable backend, and production-ready APIs This project strengthened my understanding of full-stack development, authentication flows, admin control systems, and real-world business logic. Always learning, building, and improving — one project at a time 🚀 Would love to hear feedback or collaborate on similar ideas! #FullStackDevelopment #ReactJS #NodeJS #MongoDB #ProjectShowcase #WebDevelopment #LearningByBuilding #TechJourney
To view or add a comment, sign in
-
Project Spotlight: GST Invoice Generator Excited to share my recent project — a GST Invoice Generator designed to simplify invoice creation and management for businesses. 🔹 Built a secure full-stack system with role-based authentication 🔹 Implemented Admin Dashboard to manage users, invoices & analytics 🔹 Integrated real-time invoice tracking and data visualization 🔹 Successfully generated ₹9,999 in revenue during testing phase 💰 🔹 Focused on clean UI, scalable backend, and production-ready APIs This project strengthened my understanding of full-stack development, authentication flows, admin control systems, and real-world business logic. Always learning, building, and improving — one project at a time 🚀 Would love to hear feedback or collaborate on similar ideas! #FullStackDevelopment #ReactJS #NodeJS #MongoDB #ProjectShowcase #WebDevelopment #LearningByBuilding #TechJourney
To view or add a comment, sign in
-
PayZephyr v1.2 just launched. We've implemented 6 critical security features: SQL Injection Prevention - Validated table names Webhook Replay Attack Prevention - Timestamp validation across all providers Multi-Tenant Cache Isolation - Prevents cache poisoning Automatic Log Sanitization - Sensitive data never logged Smart Rate Limiting - Per-user payment throttling Enhanced Input Validation - RFC-compliant email, HTTPS URLs Added a new payzephyr:install artisan command for streamlined package setup, Automatically publishes configuration file Publishes migration files Optionally runs migrations with user confirmation Displays setup instructions and example environment variables Supports --force flag to overwrite existing files Centralized Idempotency Key Generation: Idempotency keys are now automatically generated ChargeRequestDTO::fromArray() now automatically generates a UUID v4 idempotency key if not provided Ensures every payment request always has a unique idempotency key Uses Laravel's Str::uuid() for consistent UUID v4 format. Here's what I'm most proud of: Adding a new provider now requires ZERO core code changes! Thanks to convention over configuration: No more hardcoded provider lists, We now have automatic driver discovery, dynamic channel mapping and config-based prefix detection. PayZephyr is production-ready with enterprise-grade security, comprehensive testing, and zero vendor lock-in. P.S. If you find PayZephyr useful, please star the repository and share with your network! It really helps the project grow. #Laravel #PHP #OpenSource #PaymentGateway #WebDevelopment #Security #FinTech #API #SoftwareEngineering #TechInnovation
To view or add a comment, sign in
-
Day 11 | Database Integration & Debugging (Prisma) 🛠️ Today was one of those days that truly tests your patience as a developer. I started integrating Prisma into our SaaS application to bring structure, scalability, and better data handling to the database layer. While doing so, I encountered multiple Prisma-related issues during setup and runtime. Some of the challenges included: • Prisma client initialization errors • Environment and configuration mismatches • Runtime failures during page rendering • Debugging stack traces across Next.js app routes • Understanding how Prisma behaves in a server-rendered environment Although progress felt slow at times, days like these are extremely valuable. They force you to understand the tooling deeply instead of just making it “work”. Debugging is not a setback — it’s part of building something reliable and production-ready. Back to fixing, learning, and improving the system. #Prisma #DatabaseDesign #Debugging #SaaS #BackendDevelopment #NextJS #BuildInPublic #SoftwareEngineering #DeveloperJourney 🚀
To view or add a comment, sign in
-
REST API vs SOAP API—From Concept to My Real Projects While building my full-stack projects using React and Spring Boot, I clearly understood why REST APIs are the industry’s preferred choice today. = How REST API fit into my projects In projects like -> Banking Application I implemented RESTful APIs using Spring Boot, where The frontend (React) communicates with backend via HTTP methods (GET, POST, PUT, DELETE) Each entity (User, Product, Employee, Account) is treated as a resource (URI-based) APIs are stateless, improving scalability and performance JSON is used for fast and lightweight data exchange Easy integration with frontend and third-party services * This made REST perfect for modern web & mobile-friendly applications. * Where SOAP API makes sense SOAP APIs are powerful when: Applications require strict security standards Transactions must be highly reliable Systems are enterprise-level (banking legacy systems, government services) SOAP’s XML-based structure, WSDL, and WS-Security make it suitable for such complex environments—but it can be bulky for everyday web apps. My Key Takeaway REST API → Best for scalability, speed, and frontend-heavy applications SOAP API → Best for enterprise systems needing strict security & standards For my projects, REST APIs were the clear choice, helping me build clean, efficient, and maintainable full-stack applications. Curious to know—have you used REST or SOAP in your projects, and why? #RESTAPI #SOAPAPI #SpringBoot #ReactJS #FullStackDevelopment #JavaDeveloper #APIs #SoftwareEngineering #LearningJourney
To view or add a comment, sign in
-
-
🚀 Today I learned about REST APIs, GET & POST methods, and JSON handling using Node.js & Express While building my backend practice project, I explored how client-server communication actually works using Postman. 🔹 Key Learnings: ✔ Difference between GET and POST methods ✔ How APIs send and receive JSON data ✔ Why req.body shows undefined ✔ Importance of express.json() middleware ✔ Testing APIs using Postman 🔹 Important Insight: Express does not read JSON data by default. To access data sent from the client, we must use: Js code : const express = require('express'); const app = express(); // Middleware to read JSON data app.use(express.json()); // GET request app.get("/user", (req, res) => { res.json({ name: "rahul" }); }); // POST request app.post("/user", (req, res) => { console.log(req.body); // Now it works! res.json({ message: "Data received successfully", data: req.body }); }); app.listen(4000, () => { console.log("Server running on port 4000"); }); ✅ app.use(express.json()); Once added, the server correctly parses JSON data and renders it on the screen. 🔹 Tech Stack Used: Node.js Express.js Postman REST API concepts This hands-on practice helped me understand real-world backend workflow and strengthened my foundation in full-stack development. 🔹 Real-Life Analogy 🌍 Think of Express like a restaurant 🍽️ GET → Asking waiter for menu POST → Placing an order Postman → Customer Middleware → Kitchen staff who understands the order language Without middleware ❌ → Kitchen can’t understand your order With middleware ✅ → Order processed perfectly 📌 Learning every day, one API at a time 💪 #NodeJS #ExpressJS #Postman #BackendDevelopment #APIs #WebDevelopment #LearningJourney
To view or add a comment, sign in
-