All case studies
Fintech · Payments
Haqqpay
Currency exchange and peer-to-peer deals
Backend Engineer·LivePaymentsP2PCompliance
Problem
Users need a reliable way to exchange currency and complete peer deals — with clear rates, verified identities, secure wallets, and protection against failed or duplicate transactions.
Context
Financial platform where correctness matters more than speed. Every deal, payout, and webhook retry must stay traceable, idempotent, and safe from race conditions on concurrent wallet operations.
Approach
- Centralised transaction management with explicit states and BullMQ processors for async settlement, locked deals, and payouts.
- Cached exchange rates in Redis with TTL so rate lookups stay fast without stale pricing in production.
- Integrated SumSub for KYC and multiple payment rails (Trust Payments, Yapily, Paystack, and others) behind webhook handlers.
- Added Sentry, throttling, MFA, and scheduled reconciliation jobs so production issues surface before users do.
Architecture
01Modular NestJS monolith
02Transaction state machine + BullMQ queues
03Redis-backed rate cache
04Webhook idempotency layer
05KYC verification pipeline
06Bull Board for queue observability
Outcome
Live exchange platform processing peer deals, Haqqpay-managed deals, payouts, and rate-driven conversions — deployed via Docker on DigitalOcean with background job processing for financial workflows.
Metrics
Daily transaction volume
Coming soon
Failed transaction rate
Coming soon
Webhook processing time
Coming soon
Stack
Node.jsTypeScriptNestJSTypeORMPostgreSQLRedisBullMQSentryDockerDigitalOcean