</>CodeWithKarani
All topics
Topic

Payments & Fintech

M-Pesa/Daraja, cards and reconciliation - the callbacks that never arrive, the error codes nobody documents, and handling money correctly.

Sub-topics

29 articles · showing 1-9 (page 1 of 4)

Payments & Fintech7 min read

Daraja API in Production: STK Push, C2B and B2C With Callbacks That Actually Work

A build-order guide to Safaricom's Daraja API with real payloads: OAuth token caching, STK Push, C2B v2 registration, B2C v3 with RSA security credentials, and the callback URL rules nobody documents.

Read
Upeosoft7 min read

POS System Kenya: Why UpeoRetail Fits How Shops Really Sell

Looking for a POS system in Kenya that survives real trade? UpeoRetail gives shops, minimarts and distributors fast checkout, honest stock, multi-branch visibility and M-Pesa payments on a hardened ERPNext backbone.

Read
Payments & Fintech7 min read

Your M-Pesa Callback Will Fire Twice: Idempotency, Retries and the 1037 Problem

Daraja callbacks are unreliable notifications, not a source of truth. Seven production failure modes, with the database constraints, pollers and parsers that make double charges structurally impossible.

Read
Upeosoft6 min read

Property Management Software Kenya: ISHI for Landlords

ISHI is a rent management system for Kenyan landlords, agents and property managers: automated invoicing, M-Pesa allocation, water billing with a field agent portal, tenant self-service and arrears dashboards.

Read
Payments & Fintech6 min read

M-Pesa Reconciliation That Scales: From Paybill Statement to Trial Balance

Stop reconciling in spreadsheets. A three-way match between the Safaricom statement, your callback events and a double-entry ledger, with named break categories and a daily close job in Python and SQL.

Read
Upeosoft6 min read

Enterprise Integrations: Connecting M-Pesa and APIs to Your ERP

M-Pesa callbacks, payment matching, e-commerce sync and eTIMS. The patterns that survive production - idempotency, queues, raw payload logs and reconciliation - and the ones that create duplicate receipts.

Read
Payments & Fintech7 min read

Build a Payments Port, Not a Daraja Wrapper: Provider-Agnostic Money Movement in Africa

The right payments abstraction is a normalised state machine plus a normalised event, not a charge() function. Ports, adapters, webhook signature handling, minor-unit traps and config-driven routing.

Read
Payments & Fintech7 min read

KRA eTIMS Survival Guide: OSCU, cmcKey and the Rules the Spec Leaves Out

eTIMS is a fiscal device protocol, not an invoicing API. Real OSCU endpoints, the device handshake, a full saveTrnsSalesOsdc payload, the tax type codes, and six gotchas that will get invoices rejected.

Read
Payments & Fintech7 min read

Daraja invalid access token: 401.003.01 is not 404.001.03

Two Daraja errors say 'Invalid Access Token' and mean different things. One is a wrong-environment token you can fix in code, the other is an entitlement problem only Safaricom can fix.

Read
Payments & Fintech - Guides, Sub-topics & Fixes · Code With Karani