E-commerce Fundamentals for Developers Tutorial
Learn E-commerce Fundamentals for Developers step by step: 40 lessons in 13 chapters with examples, quizzes, diagrams and projects.
Start learning →
of lessons completed
Getting Started
- How Online Shops Work See how an online shop fits together: storefront, backend, admin, payments, shipping, tax and search, plus business models and the build-vs-buy choice.
- The Core Domain Model Learn the entities behind every online shop (customers, products, variants, carts, orders, payments, shipments, returns) and how they relate, with Python code.
- Representing Money Correctly Why floats break prices, how to store money as integer minor units, handle JPY and KWD exponents, build a Money class and split amounts without losing cents.
Catalog and Products
- Product Catalogs and Data Modeling Design a product catalog that scales: products and SKUs, attributes, categories versus collections, brands, translations, bundles and digital goods.
- Variants and Options Model product options and variants: option axes, generating the variant matrix, avoiding combinatorial explosion, per-variant price and stock, and URL handling.
- Product Pages, Media and Content Build better product pages: responsive image sets, alt text, descriptions, specification tables, review summaries, structured content and page performance.
Inventory
- Inventory Tracking Model e-commerce inventory the right way: on hand, committed, available and incoming stock, locations, a movements ledger, backorders and preorders.
- Reservations and Overselling Prevent overselling in your online shop: when to reserve stock, TTL holds, race conditions, atomic decrements, optimistic locking and flash-sale tactics.
Pricing, Promotions, Tax
- Pricing Models How online shops store and resolve prices: base and compare-at prices, price lists, volume and tiered pricing, B2B contracts, customer groups and schedules.
- Building a Promotions Engine Design an e-commerce promotions engine: percent, fixed, BOGO and free-shipping discounts, coupons, stacking rules, usage limits, proration and audit logs.
- Sales Tax, VAT and GST Understand e-commerce taxes as a developer: inclusive vs exclusive prices, nexus, destination rules, EU VAT and OSS, tax classes, rounding and reverse charge.
- Currencies and Localization Sell worldwide: multi-currency pricing, exchange rates and when to lock them, rounding rules, Intl.NumberFormat, locales, address and phone formats, time zones.
Cart and Checkout
- Designing the Cart Design a shopping cart that survives real shoppers. Learn guest and logged-in carts, merging on login, price snapshots, validation and abandoned carts.
- Checkout Flow and Conversion Design a checkout that converts. Compare one-page and multi-step flows, guest checkout, address validation, express wallets, form errors and accessibility.
- The Order Lifecycle and State Machines Model e-commerce orders with explicit states and legal transitions. Learn separate payment and fulfillment statuses, event history and order snapshots.
Payments
- How Online Payments Work Understand the parties behind an online card payment: merchant, PSP, acquirer, card network and issuer. Compare integration styles, methods and fees.
- Authorization, Capture, Refunds and Chargebacks Learn the payment lifecycle: authorization holds, capture timing, partial capture, voids, refunds and chargebacks, plus how to model them in a ledger.
- PCI DSS Scope and 3-D Secure Keep card data out of your systems. Learn PCI DSS scope, tokenization, hosted fields, SAQ types, SCA under PSD2, the 3-D Secure flow and liability shift.
- Webhooks and Signature Verification Learn how payment webhooks work in an online shop: signed events, HMAC verification, timestamp tolerance, constant-time compare, retries, ordering and replay protection.
- Idempotency and Reliable Payments Make payments safe to retry: idempotency keys, duplicate submits, exponential backoff, exactly-once effects, deduplicating webhook events and the transactional outbox pattern.
Shipping and Fulfillment
- Shipping Methods and Rates Learn how shops calculate shipping: flat rates, weight and zone tables, free-shipping thresholds, dimensional weight, carrier rate APIs, delivery estimates, pickup and duties.
- Fulfillment, Returns and Refunds Understand order fulfillment from pick, pack and ship to split shipments, tracking, 3PLs, RMAs, restocking, refunds versus exchanges versus store credit and reverse logistics.
Search and Merchandising
- Product Search, Filters and Facets Learn how shop search works: indexing products, relevance, typo tolerance, synonyms, facets with counts, sorting, zero-result handling and when SQL is enough versus a search engine.
- Merchandising and Recommendations Learn collections, ranking rules, related and also-bought products, cross-sell and upsell, personalization basics, and how to A/B test prices and layouts without fooling yourself.
Growth, SEO and Analytics
- SEO for Online Shops Technical SEO for online shops: clean URLs, canonicals for variants and filters, faceted navigation, Product structured data, sitemaps, out-of-stock pages and Core Web Vitals.
- Analytics, Funnels and Metrics Learn how shops measure themselves: events and the data layer, funnels, conversion rate, AOV, LTV, CAC, cohorts, server-side tracking and consent, with a live funnel analysis.
- Transactional Email and Customer Lifecycle How shops use email: order confirmations, shipping and receipts, deliverability with SPF, DKIM and DMARC, abandoned cart flows and subscription billing, with a live template demo.
Trust, Security and Compliance
- Fraud and Risk Management Understand card testing, stolen cards, account takeover and friendly fraud, then build risk signals, velocity limits, manual review and a rule-based scorer that balances losses and lost sales.
- Securing an Online Shop Secure a shop's code: sessions, price and quantity tampering, IDOR on orders, rate limiting, CSRF and XSS in checkout, admin hardening, secrets and dependency risk, with a live tamper demo.
- GDPR, Consumer Law and Accessibility A developer's overview of shop compliance: consent, data minimization, export and deletion, retention, cookies, withdrawal rights, price transparency, policies and accessibility. Not legal advice.
Architecture and Operations
- Architecture, Scaling and Peak Traffic How to structure an online shop and keep it fast under load: monolith vs headless vs composable, caching, queues, read replicas, search offload, flash sales, graceful degradation and observability.
- Integrations: ERP, PIM, OMS and Marketplaces How a shop exchanges data with ERP, PIM, OMS and marketplaces: sync patterns, polling vs webhooks, field mapping, conflict resolution, rate limits and building a product feed.
- Choosing a Platform: Build vs Buy Compare hosted platforms, open-source shops, headless setups and custom builds. Weigh total cost, extensibility, migration effort and vendor lock-in with a clear decision method.
Projects
- Project: A Complete Order Engine Build a small but complete order engine in Python: cart, coupon discounts, allocation across lines, tax, totals in integer cents, order creation with snapshots and a state machine.
- Project: Inventory Reservation Service Build an inventory service in Python with a stock ledger, time-limited reservations, an expiry sweep, and a deterministic simulation that shows how check-then-act overselling happens.
- Project: A Payment Webhook Handler Build a payment webhook handler in Node.js: verify HMAC signatures with a timestamp window, dedupe events, ignore stale out-of-order events, update payment state and survive provider retries.
- Project: A Checkout API Build a small checkout API in Node: server-side cart totals, stock checks, an order state machine and an idempotent payment endpoint, all tested with fetch.
Practice and Review
- Practice Exercises with Solutions Six runnable e-commerce exercises with worked solutions: splitting cents, stacking discounts, tax rounding, stock holds, order states and webhook signatures.
- E-commerce Interview Questions Prepare for e-commerce developer interviews: money, carts, overselling, idempotent payments, tax rounding and system design prompts, with answers and runnable code.
- E-commerce Cheat Sheet A one-page e-commerce cheat sheet: money rules, order states, payment flow, webhook and security checklists, a launch checklist and links to every lesson.