Compliance in most fintech pipelines I've seen is a document, not a system: a Privacy Policy sitting in a shared drive, a Data Protection Impact Assessment done once at launch and never revisited, an audit trail that means "someone can pull the logs if asked." That approach works until it doesn't. Usually right when a regulator, an auditor, or an angry customer actually asks.
Governance-as-code is the alternative: compliance procedures, audit trails, and data lineage tracking become part of the pipeline itself, automated and continuous, rather than manual oversight bolted on afterward. Building PesaGuard against the Data Protection Act, 2019 has forced me to think about what that actually looks like for a small Kenyan fintech pipeline, not a hypothetical enterprise one.
Start with the actual law, not generic "compliance"
Kenya's Data Protection Act, 2019 and the ODPC's guidance aren't abstract. They specify things like lawful basis for processing, data subject rights, and breach notification timelines. For a reconciliation platform handling M-Pesa transaction data on behalf of SACCOs and small fintechs, that translates into concrete pipeline requirements:
- Every field that touches personal or transaction data needs a documented lawful basis, not just a database column.
- Data subject access requests need to be answerable from the pipeline itself. You need to be able to find and export everything tied to one identifier quickly, not reconstruct it manually.
- Breach notification has a clock attached. If you can't tell when an unauthorized access happened, you can't meet that clock.
What this looks like in a Daraja pipeline
Concretely, for a pipeline ingesting M-Pesa/Daraja callbacks:
- Schema validation at ingestion. Every incoming event is validated against a strict schema before it's accepted. This is both a data-quality control and a governance control, since it prevents unexpected personal data fields from silently entering the pipeline unflagged.
- Access logging as a first-class event. Every read of transaction-level data, not just writes, gets logged with who, what, and when. This is what makes a DSAR or a breach investigation answerable in hours instead of days.
- Automated retention enforcement. Rather than a policy document saying "we delete data after X months," the pipeline itself expires and purges records on schedule, so retention isn't dependent on someone remembering to run a cleanup job.
Daraja callback received
|
v
Schema validation (reject unknown/unexpected PII fields)
|
v
Access-logged write to transaction store
|
v
Retention clock starts (auto-purge at policy limit)