A B2B marketplace where 850+ retailers source from 120+ suppliers, and $12M+ in orders clear without a single manual invoice. Built on Next.js, Node, Postgres and Stripe Connect.
A single retailer cart routinely spans five or more suppliers. Charging once but paying many is the hard part: each sub-order needs its own price tier, MOQ check, platform fee and payout target.
We model the cart as a parent order with per-supplier children, authorize one Stripe PaymentIntent, then fan funds out through Connect transfers. Money sits in escrow until delivery is confirmed, so retailers get one charge and suppliers get clean, reconciled payouts.
Suppliers clear KYC before listing; retailers are credit-checked before unlocking net terms. Every state transition, accepted, shipped, delivered, settled, is webhook-driven and idempotent, so a retried Stripe event can never double-pay.
The Postgres ledger is the source of truth and is reconciled nightly against Stripe payout reports, flagging any drift before it reaches a supplier statement.
| Component | Technology | Why |
|---|---|---|
| Storefront & SSR | Next.js on AWS | SEO-friendly catalog pages, fast first paint, edge caching |
| API & order engine | Node.js services | Async webhook handling, shared TS types with frontend |
| Data & ledger | PostgreSQL (RDS) | ACID order/payment ledger, JSONB for flexible SKU attributes |
| Payments | Stripe Connect | Split payouts, escrow, KYC and net-terms out of the box |
| Search & catalog | Postgres FTS + Redis | Faceted SKU search with cached tier pricing per retailer |
| Infra |
One cart splits into per-supplier sub-orders with independent pricing, MOQ and shipping.
Funds release to suppliers only after delivery is confirmed, protecting both sides.
Per-retailer price tiers and volume breaks resolved server-side at quote time.
Credit-checked retailers choose net-30 invoicing or instant Stripe checkout.
Postgres full-text search with Redis-cached tier prices for sub-100ms results.
Real-time dashboards for GMV, fill rate, reorder velocity and payout history.
“One charge in, many payouts out, and the ledger always balances.”
What started as a directory became real B2B infrastructure: 850+ retailers and 120+ suppliers transacting over $12M+ in GMV, with split payments, escrow and net terms that used to live in spreadsheets now fully automated. The Next.js/Node/Postgres/Stripe stack on AWS scales horizontally, the ledger reconciles itself nightly, and onboarding a new supplier takes minutes instead of a sales call, proof that the hard problems in a marketplace are settlement and trust, not the storefront.
| AWS ECS, RDS, S3 |
| Multi-AZ autoscaling, durable asset and invoice storage |