Skip to content

Typed Daraja flows for Node.js teams

Build STK Push, C2B, B2C, account balance, transaction status, reversal, and callback handling with one focused TypeScript SDK.
  • Build against Safaricom Daraja from a Node.js runtime without carrying your own auth, request, and callback plumbing.
  • Keep credential handling explicit: constructor values override environment variables, and missing config fails fast.
  • Stay close to Daraja wire formats while still getting ergonomic method names and typed request/response contracts.
  • Mpesa as a single entry point for the implemented API families.
  • Automatic OAuth token fetching with in-memory caching and concurrent refresh deduplication.
  • Typed SDK errors for auth, request, validation, and callback parsing failures.
  • Optional callback parsers and a standalone HTTP callback handler for STK, C2B, and async result routes.
  • A docs set that covers local testing, sandbox credentials, go-live preparation, and common troubleshooting.
  1. Read the quick start.
  2. Configure your environment and credentials.
  3. Confirm the Node runtime expectations.
  4. Pick the guide for your first flow: STK Push, C2B, or B2C.

This SDK focuses on the commonly used Daraja payment and operational APIs. The current implementation surface and known gaps are tracked in the API coverage matrix.

Landela Tech specializes in payment integrations across local and international providers, building practical infrastructure for teams shipping real-world payment flows.

Learn more at landelatech.com.