Why We Built Payfrica
Cross-border payments remain expensive and slow for many users across Africa. During a 48-hour national hackathon, our goal was to make it simple for users to move from local fiat rails into stablecoins with minimal friction.
The Problem
Users needed:
- A faster and clearer fiat-to-stablecoin path.
- Better trust in transaction status and completion.
- A developer-friendly API layer that could integrate with local payment providers.
My Role
I led backend engineering and API architecture:
- Designed and implemented the Node.js and Express API.
- Modeled transaction states and idempotent request flow for safer retries.
- Implemented authentication and signature validation for critical endpoints.
- Coordinated integration between frontend actions and blockchain settlement steps.
Architecture Choices
1. Explicit transaction states
I modeled each payment as a state machine to avoid ambiguous status updates:
initiatedprocessingconfirmedfailed
This reduced support confusion and made retry behavior predictable.
2. Idempotency first
For payment initiation endpoints, we used idempotency keys so repeated requests would not duplicate transfers. This was essential under unstable network conditions common in demo environments.
3. Defensive API design
Key endpoints validated payload shape, signatures, and transition rules. Invalid transitions were rejected to keep ledger and payment state aligned.
Tradeoffs We Made in 48 Hours
- We prioritized a reliable core flow over broad currency coverage.
- We used pragmatic observability (structured logs and traceable IDs) instead of a full monitoring stack.
- We kept settlement abstraction minimal to ensure demo stability under time pressure.
Outcome
The prototype worked end-to-end in the hackathon demo and won 1st place nationally. More importantly, it proved that a developer-first API and clear payment state model can significantly improve the user experience for fiat-to-stablecoin conversion.
What I Would Improve Next
- Add robust webhook retries with dead-letter handling.
- Expand provider abstraction for multi-country support.
- Add role-based dashboards for ops and compliance teams.
- Track latency and failure-rate SLOs for every transaction stage.
If you are building fintech systems, my biggest lesson is simple: clear states and safe retries are non-negotiable from day one.