The verdict in three sentences
A transaction log isn't a luxury: it's your evidence in a dispute, a refund or an audit. Every payment must leave an immutable trace with at minimum reference, amount, provider, status, timestamp and IP. Without this audit trail, finding a transaction takes ~45 min instead of 10 seconds, and a tax audit or dispute becomes unmanageable.
The must-have fields to log
The rule: log the event, not just the final state. A payment moves from pending to success to refunded — each transition is a row, never an overwrite.
| Field | Example | Why |
|---|---|---|
| reference | WV-2026-08-4471 | Unique matching key |
| amount | 24,000 FCFA | Proof of what's owed |
| provider | wave / orange-money | Breakdown and fees |
| status | pending → success | Full history |
| timestamp | 2026-08-25T14:32:11Z | Ordering and disputes |
| customer IP | 41.82.x.x | Fraud detection |
| linked order | CMD-8821 | Business traceability |
| raw payload | provider JSON | Replay / debugging |
Sensitive data (full number, secrets) is never stored in clear: truncate or hash it. Keep the technical log separate from personal data to limit the risk surface.
Retention, compliance and anomalies
In Senegal, Law 2008-12 on personal data governs the duration and purpose of retention; on the tax side, accounting records are kept for several years. A good 2026 compromise:
| Data | Recommended duration | Basis |
|---|---|---|
| Transaction log (business) | 10 years | Accounting obligations |
| Raw technical payload | 12 months | Debugging / disputes |
| Access / IP logs | 6-12 months | Security, proportionality |
| Customer personal data | As long as needed | Law 2008-12, minimization |
The log also serves to detect anomalies: three failures followed by a success from the same IP, a refund with no linked order, an out-of-range amount. These signals, invisible without logs, are the first anti-fraud line.
Need a professional website?
Kolonell builds websites that attract clients, optimized for the Sénégalese market. Free quote in 2 minutes.
Mini case study
Aminata runs a ready-to-wear shop in Dakar with 1,800 transactions/month. Without a structured log, each dispute (≈ 12/month) cost her 45 min searching through screenshots: 9 h/month wasted, and 3 disputes/month lost for lack of proof (≈ 90,000 FCFA). After setting up a log with reference + timestamp + payload, search time dropped to 30 seconds, and she now wins 11 disputes out of 12 thanks to the evidence. Gain: ~8.5 h + ~80,000 FCFA/month.
FAQ
Which fields are truly mandatory? At minimum reference, amount, provider, status and timestamp. Adding the IP, linked order and raw payload turns a simple register into a real dispute and audit tool.
How long should I keep the logs? The business log follows accounting obligations (often 10 years), the technical payload 12 months, access logs 6-12 months. Personal data follows the minimization principle of Law 2008-12.
Can I store the customer's full phone number? Only if necessary and secured. For technical audit, prefer to truncate or hash it. Isolate personal data from the technical log to reduce risk.
Does a log really help against fraud? Yes. Repeated patterns (burst failures, orphan refunds, abnormal IPs) are only detectable with history. The log is the raw material of any anomaly detection.
What's the risk of no traceability during an audit? The inability to justify a payment or VAT, tax reassessments, and disputes lost for lack of proof. The cost of missing traceability far exceeds that of a good log.
Let's talk about your project. We set up a complete, compliant, audit-ready transaction log. WhatsApp +221 77 596 93 33.
Mohamed Bah
Fondateur, Kolonell
Passionate about digital and entrepreneurship in Africa, Mohamed has been helping Sénégalese businesses with their digital transformation since 2020. Founder of Kolonell, he believes every SME deserves a professional and accessible online présence.
