With Safaricom Daraja M-Pesa Express (STK Push), an initial API response is not proof that a customer’s payment completed. Keep the payment pending until you receive and process an asynchronous callback or reconcile its status. If a request times out or a callback never arrives, don’t infer failure or automatically send another prompt. Also, the official Safaricom documentation reviewed does not describe a cryptographic callback-signature mechanism, so application checks can correlate and safely process a callback but cannot prove who sent it.
What an STK Push timeout does—and does not—tell you
Safaricom’s Developers Portal says, “M-Pesa APIs are asynchronous.” Its Getting Started guide describes responses being sent to a CallBackURL or ResultURL and recommends an HTTP listener using POST. Treat the initial API response as an acknowledgement of processing, not as a settled payment result.
As an Amazon Associate I earn from qualifying purchases.
A timeout at your application, HTTP client, or reverse proxy means that layer did not receive a timely response. It does not establish that the customer cancelled, that the payment failed, or even that Safaricom did not process the request. The request may still produce a later outcome. Safaricom’s documentation does not specify a definitive STK Push timeout threshold, callback delivery deadline, or callback retry schedule.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Model the payment as a state machine
Use explicit application states so a delay or missing callback does not get mistaken for a final result. These are suggested internal states, not official Daraja status labels:
#1 Best Overall
- Get your money as soon as the next business day.
- Get set up quickly with no long-term commitments. Download the Square Point of Sale app for free, create an account, and start taking payments anywhere.
- Run your business all in one place with the free Square Point of Sale app. Track your sales, manage inventory, accept tips, send receipts digitally, and more.
- Works with Apple devices with a Lightning connector.
created → submitted → pending → succeeded | failed | unresolved
Create and persist the payment record before sending the request. Store your internal payment ID, merchant reference, amount, and any request or correlation identifiers returned by Daraja. After the request is sent, save those returned identifiers and show the customer a pending status. Update it only when you have processed an outcome or completed reconciliation.
Keep the payment’s status separate from the browser request’s status. The browser can stop waiting while the payment remains pending; a page timeout must not become a payment failure. If the result cannot yet be established, keep the record unresolved and route it through your payment-support process rather than guessing.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteRank #2
- SmartQ C368 USB 3.0 Card Reader: Four-in-one design, supports Micro SD/SD/MS/CF cards, and reads data independently; ideal for plug and play mobile use during travel.
- High data transfer speed: Supports data transfer speed up to 5GB per second (at USB 3.0 speed), compatible with USB 3.0 and USB 2.0 multi-card readers for CF and MicroSD cards.
- Multi-system compatibility: Compatible with Windows/Mac OS/Linux and other systems, no driver needed, enjoy a plug and play experience.
- Working status: Blue LED light indicator, the indicator LED lights up when powered on, the device status is clearly visible.
- In the Box: SmartQ C368 USB 3.0 Card Reader (memory card not included), Cable organizer, User manual.
Handle callback receipt durably in Node.js
Safaricom’s Getting Started guide describes an HTTP listener for responses and warns that if its server cannot reach an application listener, the gateway logs a 503 and discards the result. Design the callback path to be reachable and available, and to accept the payload durably before acknowledging it.
- Expose a public HTTPS POST route. Configure the Daraja callback URL to reach that route from outside your network. Check the method, TLS setup, routing, and any firewall or proxy rules.
- Parse cautiously. Apply a deliberate request-body size limit and reject malformed input. Validate the documented callback shape and required transaction or correlation fields against the current Daraja contract; do not assume undocumented field names or structures.
- Correlate with a server-created payment. Match the callback to a payment record created by your server. Compare the expected amount, merchant reference, and available identifiers before changing payment state.
- Persist before acknowledging. Store the raw payload, receipt time, and processing status durably. Then return the appropriate successful HTTP response promptly. This reduces the chance that a local process failure loses a result after the listener has received it.
- Do slower work asynchronously. Hand follow-up business operations to a queue or worker so callback acceptance is not held up by unrelated processing.
- Make processing idempotent and transitions safe. Use stable transaction identifiers where available to prevent duplicate processing. Do not let a late or duplicate event overwrite a confirmed success with a failure; define allowed transitions and handle conflicting information for review.
The persistence, deduplication, and state-transition practices above are reliability guidance for an asynchronous integration, not callback protocol requirements published by Safaricom. Keep consumer secrets, passkeys, and bearer tokens in server-side secret storage; do not put them in source control, browser bundles, logs, or error messages.
What callback verification can—and cannot—mean
The official Safaricom pages reviewed describe callback delivery but do not document an STK Push callback signature header, an HMAC recipe, public-key verification, mutual TLS, or a definitive callback source-IP allowlist. That absence in the reviewed pages does not prove that no production-specific mechanism exists. Confirm the current supported callback-authentication requirements directly with Safaricom before claiming cryptographic verification or deploying a security control as if it were one.
Rank #3
- Use the, easy-to-use, and customizable POS to get started.
- Accept contactless payments, chip cards, Apple Pay, and Google Pay from anywhere, with improved connectivity, extended battery life, and enhanced security. Pay one low rate for every tap or dip.
- No long-term commitments or contracts, no monthly fees- and with offline payments, keep taking payments for up to 24 hours.
- Safely and securely accepts payments anywhere. Plus, get data security, 24/7 fraud prevention, and payment-dispute management at no extra cost.
- Use the, easy-to-use, and customizable POS to get started.
Until you have authoritative guidance on sender authentication, application-side checks help protect your own records from accidental misassociation and repeated processing:
- Require a match to a pending transaction initiated by your server.
- Compare expected amounts, merchant references, and available request or transaction identifiers.
- Reject malformed payloads and state changes that are impossible under your payment flow.
- Process repeated events idempotently and reconcile ambiguous outcomes through the supported status API.
These checks do not cryptographically authenticate the sender. A callback containing the expected JSON fields is not, by itself, proof that Safaricom sent it, and an IP-address check is not a substitute for cryptographic authentication. Do not add an invented signature header, HMAC validation snippet, or assumed retry contract.
Reconcile a missing callback without prompting twice
Safaricom describes Transaction Status as a secondary reconciliation mechanism for cases where callbacks are not received. Its documentation says the query requires an M-Pesa receipt number or Originator Conversation ID, and that the status process is asynchronous too.
Rank #4
- INTEGRATED DESIGN - The integrated-designed BENFEI USB-C/USB 3.0 card reader provide high data speed access to four different card types, the SD(Secure Digital), Micro SD(TF), MS(Memory Stick) and CF(Compact Flash). And with 2in1 USB-C/USB 3.0 design, BENFEI card reader could works with computer or laptop by USB 3.0/2.0 slot or the latest USB Type-C(Thunderbolt 3) slot. A universal card reader solution.
- INCREDIBLE PERFORMANCE - With latest USB Type-C or the USB 3.0 port, fully enjoy the transfer rates in UHS-I mode up to 160MB/sec, backward Compatible with USB 2.0/1.1. Browse and view photos instantly on your USB-C/USB3.0 smartphones/laptops. (NOTE: The final data speed is decided by the card and USB slot Type )
- SUPERIOR STABILITY - Built-in advanced IC chip handle the USB-C/USB high speed data transfer signal, allow HD movies trasfer in just seconds. ✅ It is a simultaneously card reader and can read 4 card at the same moment
- BROAD COMPATIBILITY - Compatible with MacBook Pro 2019/2018/2017/2016, MacBook 2017/2016/2015, iPad Pro 2018, Surface Book 2, Samsung Galaxy S10/S9/S8/Note 8/Note 9, HTC U11/U12, Pixelbook, Dell XPS 15 / XPS 13, Galaxy Book, and many other USB-C Devices. NOTE: SDXC cards (capacity at 64GB or larger) use a special file format "exFAT", which is not supported in Windows XP, Windows Vista before SP1, and Mac OS X before 10.6.6). ❗ Incompatible with Memory Stick (Standard),Memory Stick Micro (M2) and CF Type I
- 18 MONTH WARRANTY - Exclusive BENFEI Unconditional 18-month Warranty ensures long-time satisfaction of your purchase; Friendly and easy-to-reach customer service to solve your problems timely.
- Create and save the local payment record before making the STK Push request.
- Save the returned request and correlation identifiers, then leave the customer-facing payment pending while waiting for its asynchronous outcome.
- If a callback arrives, durably save it, match it to the existing payment, and process it idempotently.
- If no callback arrives, check whether you have the receipt number or Originator Conversation ID required to use Transaction Status. Keep the payment pending or unresolved while awaiting that asynchronous result.
- If you lack the required identifier or the outcome remains unclear, keep the record unresolved and escalate through your business’s payment-support process. Do not treat uncertainty as failure.
Do not automatically retry STK Push merely because your HTTP client timed out. The original request may still complete, and a second request could prompt another payment. The official material reviewed does not establish safe retry or idempotency guarantees for STK Push requests. First inspect the local record and its identifiers; reconcile where possible instead of issuing another prompt on assumption.
Log correlation identifiers and processing outcomes needed for operations, not credentials or unnecessary personal data. The cited Safaricom pages do not specify a logging or retention policy; follow your organization’s current privacy, security, and regulatory requirements.
Callback and Transaction Status: which path to use
| Path | When it applies | Identifiers | Timing |
|---|---|---|---|
| Callback | Expected asynchronous notification from the normal payment flow | Match the received callback to the existing payment using the available request, transaction, and merchant-reference data | Asynchronous; the reviewed Safaricom Getting Started guide gives no delivery deadline or retry schedule |
| Transaction Status | Secondary reconciliation when a callback has not been received | M-Pesa receipt number or Originator Conversation ID, as stated in Safaricom’s Transaction Status documentation | Asynchronous; no guaranteed completion time is stated in the reviewed documentation |
Troubleshoot common failure patterns
- Immediate authorization error: Check whether your bearer access token has expired. Safaricom’s Authorization documentation specifies a 3,600-second lifetime (one hour).
- Request appears accepted, but no customer result arrives: Check callback listener availability, public reachability, TLS, route and HTTP method, and server logs. Safaricom warns that an unreachable listener can result in a 503 and a discarded result.
- No callback after a client timeout: Keep the payment pending or unresolved. Use Transaction Status if you have a receipt number or Originator Conversation ID; a timeout alone does not prove the payment failed.
- Repeated customer prompt or duplicate local order: Inspect whether your application retried after a network timeout. The reviewed documentation does not establish that retries are harmless or idempotent.
- Sandbox works differently from production: Check environment-specific configuration and credentials, and confirm live shortcode permissions and current production requirements with Safaricom. The portal documents sandbox apps and request simulation, but that does not establish a complete production onboarding checklist.
Test the asynchronous paths
Safaricom documents sandbox apps, request simulation, and Node.js examples. Use the sandbox where applicable, but confirm which outcomes its current simulator can produce rather than assuming it supports every failure injection.
Best Value
- Fully Compliant - Complies With All Major Industry Standards, Including Iso/Iec 7816, Usb Ccid, Pc/Sc, And Microsoft Whql. As Well As, Emv 2011 Ver 4.3 Level 1 And Gsa Fips 201.
- Seamless Integration - With Identiv-Specific Smartos You’Ll Get Easy, Complete Support Of All Major Contact Smart Card Ics And Technologies In One Simple Reader.
- Universal Compatibility - Works With Virtually All Contact Chip Cards And Pc Operating Systems, Including Windows, Macos, Linux And Android.
- Fast And Convenient- Shorten Your Transaction Time With A Reader That’S Optimized For Speed. It’S Ultra-Compact And Robust Design Is Streamlined For Mobile Operation, Making This Reader The Best Choice For Convenience, Security And Reliability.
- Ergonomic and cost efficient design
- Normal request flow followed by a callback.
- A callback arriving after the frontend has stopped waiting.
- An unavailable application listener and recovery after it is restored.
- Duplicate callbacks, unknown correlation identifiers, and malformed payloads.
- A missing callback followed by Transaction Status reconciliation when the required identifier is available.
For each test, verify durable receipt, safe customer-visible pending behavior, idempotent processing, and appropriate handling when the result remains unresolved.
Conclusion
Build STK Push around asynchronous outcomes: persist before requesting payment, distinguish an API acknowledgement from settlement, and keep uncertain payments pending until a callback or reconciliation establishes the result. Make callback receipt durable and processing idempotent. Treat correlation checks as operational safeguards, not cryptographic sender verification, unless Safaricom confirms a supported authentication mechanism for your production integration.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




