2/ What I build every time:
→ Unique constraint on the M-Pesa receipt number. Not an if-statement — the if-statement loses the race. → pending → paid state machine. Success ≠ confirmed. → A reconciler for callbacks that never arrive at all.
1/ M-Pesa will send you the same payment confirmation twice.
If your code trusts it, you just credited someone's account twice.
Safaricom retries callbacks when they don't get a clean ack. Most integrations handle the second one wrong.
@coinhold_wallet That’s exactly the idea. The callback should be idempotent: same reference → same payment result, with no second balance mutation.
The key is treating the receipt/reference as the idempotency key and persisting the payment state before processing retries
1/ M-Pesa will send you the same payment confirmation twice.
If your code trusts it, you just credited someone's account twice.
Safaricom retries callbacks when they don't get a clean ack. Most integrations handle the second one wrong.
3/ The first two protect you from double-charging.
Only the third protects the customer who paid and got nothing.
Mobile money has no synchronous confirmation. Correctness lives in the reconciliation, not the
2/ What I build every time:
→ Unique constraint on the M-Pesa receipt number. Not an if-statement — the if-statement loses the race. → pending → paid state machine. Success ≠ confirmed. → A reconciler for callbacks that never arrive at all.
What if sending a marketing email was as easy as sending a Telegram message? ✈️
With Migma, it is.
Plan, design, send and track your business emails, all from Telegram, in seconds.
No drag-and-drop. No manual work. Just on-brand emails, ready to go.
Who’s ready to try it?
➡️ https://t.co/1KWQicUCjm
Don’t just build software. Solve something.
Good technology should solve real problems, simplify processes, create value, and make a measurable impact.
That’s the mindset behind how I approach software engineering.
Build with purpose. Build for impact.
#SoftwareEngineering#Tech
🔐 API security starts long before deployment. Authentication, authorization, input validation, rate limiting, and monitoring all matter. I wrote a practical guide covering the essentials. 👇
https://t.co/kxOLyPg7cS
#APISecurity#BackendDevelopment#SoftwareEngineering
Every visitor is motivation to keep building. 🚀
📈 Portfolio this week:
• 21 visitors (+133%)
• 29 page views (+71%)
More projects, more blogs, and more learning coming soon.
🔗 https://t.co/ps5Z2oXgTM
#BuildInPublic#React#FullStack#SoftwareEngineering