Case Study · Payments · 2023 — Present
End-to-end payment pipeline that stays correct under failure — safe retries, recovery points, and a consistent ledger.
Merchants needed to accept both card and mobile-money payments through one integration. The hard part was not the happy path — it was failure. A request could time out after the customer was charged, webhooks could arrive late or out of order, and a naive retry could double-charge. Merchants were losing trust and spending hours manually reconciling.
Built for the Ghanaian market, where mobile money is the dominant rail and connectivity is uneven. The system had to treat the payment processor as unreliable and the network as hostile, while still feeling instant to the merchant.
Request path
Client
API gateway
backend
Validation
layer
Processor
card / momo
Webhook
handler
Ledger
DB update
Failure recovery & consistency
Webhook
retry
Idempotency
dedupe key
Recovery
point
Ledger
consistent
Frontend
Backend
APIs
Chose
·A well-bounded modular monolith
·Strong consistency on the ledger
·Boring, observable technology
Gave up
·Independent service scaling (not needed yet)
·Some raw write throughput, for correctness
·Newer, less proven tooling
~0
double-charges after idempotency rollout
days → min
reconciliation time per cycle
100%
transactions traceable in the ledger