This integration connects xPage stores to CODPartner, a service designed to streamline cash-on-delivery (COD) e-commerce operations across GCC markets. It enables merchants to automatically sync orders, manage fulfillment, track shipments, and handle COD payments from a unified system. The architecture emphasizes security and smart automation for efficient order processing.
Features
•Automated order fulfillment with instant order sync
•Secure COD payment collection and profit remittance
•Real-time shipment tracking and delivery updates
•Access to a GCC-wide fulfillment and logistics network
•HMAC-signed install and webhook security flow
•Order filtering by landing page and status
•Optimized cron sync; skips final statuses/failed leads
•Iframe-safe OAuth via popup and postMessage
•Zustand-powered auth flow with route guards
•Efficient 'Select all' for 10k+ items without loading
Tech Stack
•Node.js for backend logic and API development
•TypeScript for strong typing and code robustness
•Nodemon for automatic server restart in dev
•MongoDB for NoSQL document-based data storage
•Next.js for server-rendered React frontend
•Axios for efficient HTTP request handling
•Zustand for global state management in the UI
•Zod for robust client-side schema validation
Key Learnings
•Gained deep understanding of secure iframe auth
•Mastered HMAC-signed webhook and install flows
•Implemented robust, resilient webhook handlers
•Optimized data sync with efficient cron jobs
•Developed feature-based architecture for scalability
Future Improvements
•Expand order filtering options with custom rules
•Implement user-defined cron job scheduling
•Integrate additional payment gateways for flexibility
•Provide detailed analytics for fulfillment metrics