payment-gateways.com
REGIONAL Gateway

Safaricom M-Pesa (Daraja API) Integration Services

Ubiquitous Mobile Money Payment Rail Across Kenya & East Africa

Protocol: REST APIPCI Scope: SAQ-ATurnaround: 2 - 4 Days
Fast-Track Project

Need Safaricom M-Pesa (Daraja API) Integrated?

Talk directly with our senior integration developer about your platform requirements.

Or Request Fixed-Price Scope ↓

Overview & Architectural Capability

M-Pesa is East Africa's primary payment mechanism. The Safaricom Daraja API powers Lipa Na M-Pesa Online (STK Push), enabling seamless mobile checkout prompts straight to the customer's smartphone without card entry.

Technical Specifications

API ArchitectureREST API
Underlying EngineDaraja 2.0 API
PCI-DSS ScopeSAQ-A (Hosted Fields / iFrame)
3D Secure 2.2 Support❌ Not Applicable / Offsite
Tokenized Subscriptions✅ Supported (Merchant-Initiated Transactions)
Digital WalletsStandard Cards
Sandbox Testing Environment✅ Dedicated sandbox with test cards available

Integration Capabilities Delivered

Lipa Na M-Pesa Online STK Push API
Customer to Business (C2B) register URL validation and confirmation callbacks
Business to Customer (B2C) automated refunds and payouts
Dynamic OAuth2 token generation with consumer key and secret
Instant payment notification callback listener

What We Need From You to Start

1Daraja Portal Developer Account
2Consumer Key & Consumer Secret
3Lipa Na M-Pesa Shortcode (Paybill or Till Number)
4Lipa Na M-Pesa Passkey
5Public HTTPS Callback URL for webhook responses

Common Safaricom M-Pesa (Daraja API) Error Codes & Troubleshooting

Real error codes encountered when integrating Safaricom M-Pesa (Daraja API) and how our development team resolves them.

Error CodeRoot CauseDeveloper Resolution
1032Transaction canceled by user on STK Push prompt.Prompt user to retry or provide alternative payment option.
1037DS timeout - user did not enter PIN in time.Retry STK Push or allow manual Paybill entry.

Platforms We Integrate Safaricom M-Pesa (Daraja API) Into

WordPress / WooCommerceReady
Custom Next.js & ReactReady
Laravel (PHP Backend)Ready
Mobile Apps (Flutter & React Native)Ready
Security Assurance

Zero Sensitive Card Storage

We develop all Safaricom M-Pesa (Daraja API) checkouts using secure client-side tokens or hosted fields. Your customer payment details never touch or remain on your servers, keeping your platform fully compliant with PCI DSS regulations.

Mutual NDA signed before credentials transfer
Full unencrypted source code ownership
Client-side live connection & payment verification
Free Architectural Review

Request Custom Integration Scope

Gateway
Platform
Readiness
Contact

Select your provider or enter your acquiring bank providing your commercial merchant facility.