BUILDING A RESILIENT PAYMENT ORCHESTRATION LAYER
Architecting a resilient financial backbone: From fragmented payments to a centralized, event-driven 'Mall' infrastructure.
The problem worth engineering
This project was born from the need to unify payment processing for a suite of independent applications (SaaS, E-commerce, Gaming) into a single, robust infrastructure. The core architectural metaphor was the 'Mall' (The Gateway) and 'Stores' (Client Apps).
The challenge wasn't just processing payments, but orchestrating complex financial flows securely and reliably across a distributed system. I engineered a Hybrid Frontend-First architecture where the backend never touches raw card data, relying on secure tokenization to ensure PCI compliance.
The system features a sophisticated 'Self-Healing' webhook mechanism to handle distributed race conditions, ensuring zero data loss even when provider notifications arrive out of order. Built with a strict adherence to SOLID principles and Clean Architecture, the platform leverages Prisma ORM for type-safe database interactions and implements a custom Native Subscription Engine that bypasses provider limitations to offer full control over recurring revenue cycles.
- Architected a 'Hybrid Frontend-First' payment flow: To eliminate security risks, the frontend securely tokenizes credentials via the provider's SDK. The backend acts solely as a verification and orchestration layer, ensuring sensitive data never touches our servers.
- Designed a Normalized Multi-Tenant Identity Model: Solved user fragmentation by implementing a global 'Customer' entity linked to specific 'PlatformCustomer' identities via a bridge table. This enables a 360° view of user LTV across all client applications.
- Engineered a 'Self-Healing' Webhook System: To combat race conditions where webhooks arrive before database transactions commit, I built a defensive handler that intelligently detects missing records and reconstructs the transaction state on-the-fly, guaranteeing 100% data consistency.
How it was built, system by system

Interface documentation
Click any screen to inspect it full size.
Related Projects
Explore more of my work

Goods&U | Full-Stack Bilingual (Arabic-RTL) E-Commerce Platform

Polary | Cinematic 3D Narrative Landing Experience

Diagnostics Elite | Cinematic Bilingual MedTech Platform (WebGL + Sanity)

Fix Vision | Interactive High-Performance Creative Agency Platform

IQ Academy | Full-Stack Arabic EdTech Learning Platform

TMT Eye | Enterprise Intelligent Transport Operating System

Goods&U | Full-Stack Bilingual (Arabic-RTL) E-Commerce Platform

Polary | Cinematic 3D Narrative Landing Experience

Diagnostics Elite | Cinematic Bilingual MedTech Platform (WebGL + Sanity)

Fix Vision | Interactive High-Performance Creative Agency Platform

IQ Academy | Full-Stack Arabic EdTech Learning Platform

