Izipey

Back to portfolio

Web development

Developers who want to accept or send mobile money in Haiti have to integrate MonCash directly: undocumented edge cases, dropped callbacks, no real sandbox, and a rewrite the day they add a second wallet. There is no Stripe-like layer for the Haitian market.

Izipey is a single REST API with universal payment objects (payment intents, refunds, payouts), signed webhooks, an isolated sandbox and a ledger merchants can trust. Adding a new provider such as NatCash means writing one adapter, with no change to the public API.

Architecture: a NestJS modular monolith on MongoDB replica-set transactions, using the native driver with $jsonSchema validators. The adapter pattern hides each provider behind one interface; explicit state machines drive intents (created → requires_action → processing → succeeded | failed | expired | canceled) and payouts; an append-only double-entry ledger, where every transaction group balances inside a Mongo transaction, derives balances instead of storing them. Scheduled jobs handle reserve release, intent expiry and reconciliation, and a circuit breaker covers payout failover.

Best practices: amounts stored as integer minor units only; idempotency keys on intents and payouts plus deduplication of provider callbacks; at-least-once webhooks with HMAC + timestamp signatures, backoff retries, a dead-letter queue and replay; envelope-encrypted provider credentials and API key rotation; Zod-validated configuration and structured Pino logging. 28 e2e suites (ledger, trial balance, reconciliation, webhooks) and unit tests with coverage gates, Lefthook pre-commit and pre-push hooks (oxlint, Prettier, tsc, tests), and CI and deploy workflows.

Stack

  • NestJS 12
  • TypeScript
  • MongoDB
  • Zod
  • Pino
  • Vitest
  • Docker
  • Lefthook

Gallery