Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Real‑Time Dynamic Pricing in Medusa – Fluctum

说明与用途

Fluctum 为 Medusa 添加动态定价,实时更新价格并在结账时锁定价格。

问题

E‑commerce merchants selling spot‑priced goods (gold, silver, etc.) face price mismatches between add‑to‑cart and checkout because market quotes change continuously, leading to losses or unhappy customers.

结果

The Fluctum starter demonstrates end‑to‑end dynamic pricing: live price updates via SSE, checkout‑time price locking, and audit‑ready price records, all without custom engine development.

工作流

  • Create a repo from the Fluctum starter template
  • Install dependencies with pnpm
  • Configure environment variables (copy .env templates, set API keys)
  • Start Docker Compose to run PostgreSQL and Redis
  • Run Medusa migrations
  • Create an admin user and start the backend
  • Copy the publishable API key to the storefront .env
  • Start the storefront
  • Add a product to the cart and observe live SSE price updates
  • Proceed to checkout, triggering lockCartPrices
  • Complete the order, verifying price lock and validation

证据

Fluctum fetches live spot prices on a schedule, streams them to the storefront, and locks the computed price for a cart when checkout begins.

来源

The price stays fixed across these steps – it won’t drift even if the underlying spot price moves in the meantime.

来源

  • 记录日期: 2026-09-08T19:32:03.130Z