Ordexa — Commerce operations platform for COD merchants
A SaaS that runs the full post-order journey for cash-on-delivery sellers in Pakistan and South Asia: confirmation, courier booking, tracking, returns, cash collection and customer retention.
The problem
COD merchants lose margin to fake orders, failed deliveries and manual cash reconciliation. They also track shipments across several courier portals and juggle disconnected tools for orders, inventory and customer messaging.
What I built
- A multi-tenant Laravel API and React/TypeScript SPA with organization-scoped data, per-channel access and custom roles with per-member permission overrides.
- A courier integration layer with a common driver interface over 7 Pakistani couriers (TCS, Leopards, PostEx, M&P, Daewoo, Tranzo, Flaship) for booking, tracking, load sheets and city-code sync.
- Sales channel sync for Shopify and Salla (Saudi Arabia) via OAuth, webhooks and order import, and Ordexa ships as an embedded Shopify app.
- COD finance tools: receivables aging, courier remittance batches, bank-statement matching and remittance disputes.
- A reporting engine with nightly rollups, integrity checks, and saved, scheduled and exportable reports.
- Order confirmation and retention: a WhatsApp Cloud API inbox and campaigns, a Node.js WhatsApp gateway, voice-call confirmation, order risk scoring and AI-assisted address correction.
- Subscription billing with plans, add-ons and credit wallets across Stripe, Shopify Billing and manual payments, plus a super-admin console.
Tech stack
Architecture & engineering notes
Multi-tenancy & access
- A global organization scope on the base model isolates tenant data by default, and a channel scope limits non-owners to the sales channels assigned to them.
- Team-scoped roles and permissions (Spatie), an owner bypass, 2FA and super-admin impersonation for support.
- Plan limits are enforced in the database by a usage guard, with Redis counters synced on a schedule.
Background processing
- Queued jobs on Redis/Horizon handle Shopify sync, imports and exports, WhatsApp messaging and courier tracking.
- Scheduled jobs run courier tracking pulls, COD aging alerts, nightly report rollups, recurring expenses and template syncs.
- Webhook handlers receive events from Shopify, Salla, Stripe, WhatsApp and the voice provider.
Marketing site
- Built ordexa.cc in Next.js 15 as an SEO-focused static export. Blog, pricing, integrations and FAQs are pulled from the platform API at build time.
- A token-protected rebuild webhook regenerates the site whenever content changes in the admin.
Quality
- Pest test suite, PHPStan/Larastan static analysis and Pint formatting on the back end, and strict TypeScript with Zod-validated forms on the front end.
- Order items snapshot product data at the time of purchase, so historical orders and reports stay accurate when the catalog changes.