Back to selected work

Case study

PayUnify is a payment orchestration platform built to keep Nigerian payment flows resilient when providers fail, slow down, or drift apart.

The monorepo shows a serious infrastructure product: SDK routing logic, provider adapters, a Prisma-backed API, merchant dashboards, developer docs, and sample integration surfaces. It is much more than a payment wrapper or dashboard skin over one gateway.

Visit live project
Category: Payment orchestration

Project snapshot

10

workspace packages and apps spanning core SDK, provider adapters, dashboard, docs, marketing site, API, and sample commerce demo

4

payment providers supported across Paystack, Flutterwave, Monnify, and Korapay

46

API source files for auth, billing, analytics, webhooks, enterprise services, transaction storage, and merchant operations

2

operating modes beyond simple SDK usage: aggregator model and orchestrator model with managed or private execution

What NEXGEN built

A resilient payment stack spanning orchestration logic, merchant operations, and developer adoption.

Core payment-routing engine that registers provider adapters, scores provider health, and selects the best path based on routing strategy, cooldown windows, and retryability.

Unified API and merchant infrastructure for payment initialization, verification, analytics, billing, developer tooling, enterprise controls, and environment-aware authentication.

Webhook normalization layer that ingests disparate events from multiple providers, converts them into one internal schema, and forwards signed merchant webhooks with retry support.

Merchant dashboard for transactions, API key management, developer settings, billing, webhook history, and operational visibility across test and live environments.

Developer ecosystem surface that includes landing site, docs app, React package, sample e-commerce integration, and provider-specific packages for self-hosted orchestration flows.

Why it matters

The strongest idea here is that payment reliability is treated as a systems problem, not merchant bad luck.

PayUnify’s value comes from the combination of routing, observability, webhook normalization, and merchant tooling. The repo consistently frames resilience as the main product promise.

Built for Nigerian payment reality

The core framing in the repo is that provider failure is normal, not exceptional. PayUnify’s architecture assumes downtime, degraded success rates, and inconsistent gateway behavior, then routes around it instead of making merchants solve that complexity alone.

Product plus protocol thinking

This is not only a merchant dashboard. It combines a routing engine, a normalized payment API, provider adapters, merchant operations, auditability, and developer-facing integration surfaces into one coherent platform.

Flexible operating model

The platform supports both a managed SaaS-style aggregator path and orchestration models where enterprises keep their own provider relationships and keys. That makes the architecture much more adaptable than a one-mode gateway wrapper.

Developer experience is part of the product

The monorepo includes docs, React integration surfaces, a sample commerce app, and premium dashboard tooling because adoption depends on how quickly developers can test, understand, and trust the system.

Architecture

A platform architecture that supports SDK usage, managed orchestration, and merchant operations in one system.

Monorepo built with Turbo and shared TypeScript packages, separating core routing logic, provider adapters, API server, merchant dashboard, docs, marketing site, and sample integrations
Core SDK layer with provider registry, payment router, health monitor, validators, and advanced orchestration primitives
Express and Prisma API layer handling merchant auth, billing, analytics, webhook ingestion and forwarding, audit logs, key management, and transaction persistence
Next.js merchant dashboard and separate public web/doc surfaces for product marketing, developer onboarding, and integration walkthroughs

Technology stack

TypeScript
Turbo
Next.js 16
React 19
Express
Prisma
PostgreSQL
Paystack
Flutterwave
Monnify
Korapay
JWT
Winston
Framer Motion

What stands out

The most distinctive part of PayUnify is that it supports different commercial models without changing its core identity: managed payment infrastructure for smaller merchants, and orchestration intelligence for larger teams that already own their provider relationships.

System breakdown

The repo shows a platform designed around resilience, visibility, and merchant control.

Routing and health engine

The core package contains the payment router, provider registry, health monitor, and validator layer. The docs describe weighted routing, cooldown windows, retry chains, and preview tooling so merchants can understand how the switch behaves under stress.

Merchant auth and key infrastructure

The API layer includes a dedicated key service, auth middleware, tier enforcement, and database-backed merchant context so the platform can support test/live isolation, API key rotation, and secure multi-tenant access patterns.

Webhook and audit operations

Webhook handling is treated as a product surface, not a footnote. The system normalizes provider callbacks, stores delivery records, retries failed deliveries with backoff, and exposes history and inspection views in the dashboard.

Merchant and developer surfaces

Dashboard routes cover transactions, developers, API keys, billing, settings, and webhook history, while the wider monorepo includes docs and a sample e-commerce app that demonstrates how PayUnify is meant to be embedded in real products.

Repo evidence

The structure and docs both support the orchestration story.

The README positions PayUnify as an intelligent payment SDK for Nigerian businesses with automatic failover, normalized webhooks, provider health routing, and 95%+ success-rate targets.
The operating-model docs clearly define aggregator and orchestrator modes, including managed cloud execution and private self-hosted library flows for more demanding clients.
The dashboard progress docs show completed merchant UI work for API keys, webhook history, tier awareness, and a normalized webhook engine with signed forwarding and retry logic.
The repo includes dedicated packages for `core`, `react`, and each provider adapter, plus apps for `api`, `dashboard`, `docs`, `web`, and `sample-ecom`, which is a strong signal of platform-level ambition rather than a thin wrapper.