Paul S.

Cart-Checkout Platform

A backend checkout orchestration service across cart, catalog, promotions, payments, and downstream order workflows — and the layer that let Peloton migrate off a legacy monolith one funnel at a time without risking revenue.

Context

Peloton's commerce platform spanned multiple checkout channels, a commerce backbone in Commercetools, several payment partners, and a long tail of downstream order workflows. Each surface integrated with these systems directly, which made changes risky and latency unpredictable. It runs ~4K orders/week (~200K+/yr) at ~120 order placements/min at peak.

Problem

Front-end and partner teams needed a single, stable contract for cart and checkout. Add-to-cart was ~5s in the worst case, end-to-end checkout ~10–15s, and there was no clean place to coordinate promotions, payments, and order workflows without touching multiple services — while checkout, the most revenue-critical path, was the hardest thing to change safely.

What I did

  • Designed and launched the core cart-checkout service as a backend orchestration layer over Commercetools, catalog, promotions, payments, tax, and downstream order workflows, using hexagonal / ports-and-adapters so each channel, payment provider, and downstream system plugged in without coupling.
  • Exposed REST, GraphQL, and gRPC adapters as one stable contract for web, mobile, and service-to-service checkout surfaces.
  • Built a transactional place-order flow with idempotency keys, retry/backoff, gateway "unknown-outcome" handling, and durable order-sync with DLQ/replay.
  • Drove a strangler rollout — a feature-flag / A-B router with live guardrails (conversion, payment success, p95 latency, error budget) and a kill switch to force traffic back to legacy — starting with the warranties funnel and low-traffic countries.
  • Coordinated integration work with Stripe, Affirm, Avatax, and Commercetools partner engineering, plus design, localization, and legal.
Cart-checkout hexagonal ports-and-adapters architecture
Hexagonal ports-and-adapters: the domain core stays stable while vendors and channels plug in through adapters.
Cart-checkout strangler rollout with feature-flag router, guardrails, and kill switch
Strangler rollout: each funnel migrates behind a flag with live guardrails and an instant kill switch.

Result

  • Add-to-cart ~5s → ~400ms (industry-standard target); end-to-end checkout ~10–15s → under 2s.
  • Gave product and partner teams a single, stable checkout contract across every funnel and market.
  • Modeled first-class channels (country / currency / sales channel), unblocking multi-country / multi-currency growth without rewrites.
  • Cut incident mitigation from hours to minutes (route back to legacy), making future checkout changes meaningfully safer to ship.

Tech

  • Kotlin
  • Spring WebFlux
  • hexagonal / ports-and-adapters
  • GraphQL
  • Netflix DGS
  • Commercetools
  • Redis
  • SQS / Step Functions
  • AWS
  • EKS
  • Terraform
  • Argo CD
  • Datadog
  • OpenTelemetry