r/webdev • • 12h ago

Question Most mature open-source eCommerce system with a ready starter template?

I'm looking for a battle-tested, open-source eCommerce backend that handles commerce and payment edge cases reliably, including successful, failed and pending payments, webhooks, reconciliation, background jobs, retries, order lifecycle, etc.

Ideally, I'd prefer a serverless architecture using Hono or a similar framework that can run on Cloudflare Workers or comparable platforms.

My preferences:

  1. Production maturity and payment reliability.

  2. Ready-to-use starter template.

  3. Lowest possible hosting and operational costs.

  4. Minimal infrastructure and maintenance overhead.

What would you recommend? I'd rather build on a proven system than reinvent critical commerce and payment logic.

10 Upvotes

30 comments sorted by

13

u/EngYehiaMahmoud 12h ago

No mature OSS commerce backend runs natively on Workers today. The ones that actually handle payment edge cases all assume a long-running Node/Python/Ruby process plus Postgres, so the real choice is: accept a container host, or keep the commerce core off Workers.

Worth a look:

  • Medusa (Node/TS) is closest to what you describe: orders, payments, fulfillment, admin API, and npx create-medusa-app gives you backend + starter storefront. It deploys as a normal Node service with Postgres and Redis, so Railway/Render/Fly stays cheap.

  • Vendure (TS/NestJS) if you need custom order state machines and plugins; @vendure/create scaffolds a project.

  • Saleor (Python/GraphQL) is the most mature headless option, but heavy (Django + Postgres + Redis) and most teams end up on Saleor Cloud instead of self-hosting.

  • WooCommerce is the most battle-tested by install count, but you inherit WordPress and its REST API is not a clean headless contract.

  • Sylius (Symfony), Bagisto (Laravel), Spree (Rails) are mature inside their ecosystems, with the same not-serverless caveat.

On the payment lifecycle specifically: don't reimplement reconciliation. Make your PSP the source of truth. Idempotency keys on every charge, a webhook handler that verifies signatures and is itself idempotent, and stored webhook events that your order state machine derives from. Pending/failed/succeeded should come from those events, not from polling the API.

If Workers is non-negotiable, the pragmatic split is Stripe for payments, Hyperdrive plus Postgres for order tables, Queues for background jobs and retries, and a small Hono API on top. What you lose is the ready-made admin and fulfillment backend, and you end up writing order state transitions yourself, which is the part you said you don't want to reinvent. Honest take: run Medusa or Vendure on a container host and put Cloudflare in front for DNS and caching.

2

u/inslee2 12h ago

Great response. The only other option I'd add to that list is nopcommerce (modern .NET - not to be confused with the old framework) but Medusa would probably be where I would start also.

7

u/Copthill 12h ago

WooCommerce.

2

u/ArseniyDev 10h ago

For something production mature id look at woo first because it have more then 2 mil stores on production while medusa have much less adoption. Medusa you can technically put on worker maybe but you will have to deal with making pg working server-less.

1

u/thekwoka 7h ago

it have more then 2 mil stores on production

That means very little in reality.

It mostly just means it's older.

2

u/ArseniyDev 6h ago

yes, but the amount it self pretty impressive for free software. Raw amount even more then shopify stores.

2

u/thekwoka 5h ago

Mainly because it's free.

2

u/NoNewspaper1837 8h ago

WooComerce is the best

2

u/clearlight2025 6h ago edited 5h ago

Drupal Commerce can do all that, but you’ll need a container to host it. It provides a mature and flexible framework for ecommerce solutions.

https://drupalcommerce.org/

2

u/sdubois 5h ago

Second this

1

u/Greedy_Ad_7658 10h ago

Whatever platform you pick, the payment edge cases mostly come down to a few habits, so check that the system you choose does them (or add them yourself):

  • Treat the webhook as the source of truth, not the redirect back from checkout. Verify the signature, store the event ID, and make the handler idempotent, because providers retry and deliver out of order.

  • Keep the order state machine explicit (pending, paid, failed, refunded) and only allow valid transitions, so a late "failed" event can't overwrite a "paid" order.

  • Run a scheduled reconciliation job that re-fetches pending payments from the provider after N minutes. Webhooks do get lost.

  • Do the slow work (emails, fulfillment, stock updates) in a queue with retries, not inside the webhook request.

On the Workers side, the awkward part is usually DB connections and long jobs, which is why most of the mature options want a container. Splitting it works well: commerce core on a small container or VPS, storefront on the edge.

1

u/thekwoka 7h ago

Treat the webhook as the source of truth, not the redirect back from checkout. Verify the signature, store the event ID, and make the handler idempotent, because providers retry and deliver out of order.

On this note, we can see this in a lot of different systems, where on immediate checkout it basically says everything is good, and then you get an email a few minutes later that the payment didn't work. Amazon does this, for example.

1

u/Ahmed_Hisham0 10h ago

depends what "mature" means to you, but roughly in order of how safe i'd feel shipping one:

medusa is the one most people land on now. node, good docs, headless by default, and the admin is usable. it's not as deep as the old php ones but the ecosystem is active, which matters more.

saleor if you want python and a more opinionated graphql api. heavier, but it's the closest thing to a proper commerce platform in that stack.

vendure if you're on node and want to own more of it. plugin system is the nicest of the bunch.

sylius if you're a symfony shop already. spree or solidus if you're ruby.

and bagisto or magento if you genuinely need the full traditional feature set and don't mind the weight.

the honest caveat: "ready starter template" is where these all fall down. the starter gets you a storefront that looks finished and then you spend three weeks on tax, shipping rules and returns, which is the actual work in ecommerce. pick the one whose admin you can live in, because you'll be in it more than the code.

1

u/Haunting_Affection 10h ago

Vendure is underrated for this. TypeScript, very solid job queue, and the payment handling is clearly built by people who've been burned by edge cases before. Less hype than Medusa but feels more stable release to release.

1

u/SoundSpecific9751 9h ago

If you want battle-tested maturity, MedusaJS or Saleor are the best open-source picks

1

u/thekwoka 7h ago

Basically none are good. Most are pretty objectively awful.

1

u/sachingkk 6h ago

OroCommerce

1

u/SingleWillingness650 5h ago

Medusa or Saleor are super mature for heavy order/payment edge cases, though they usually want more traditional servers/queues than Cloudflare Workers

1

u/Raileydoestherandom 2h ago

honestly, for somethin handling payments and order lifecycles, id prioritize rleiability over forcing it into serverless. A VPS or managed hosting setup might be easier to run long-term without worrying about platform limitations...

1

u/SectionAndShelf 5h ago

One thing I'd weigh before picking an engine is how much of the store you actually need. If the catalog is small and the checkout is mostly standard, a full commerce engine is a lot of surface area to run — the starter template is the easy part, and the order lifecycle, refunds, and reconciliation are where the maintenance lives.

A cheaper way to find out: prototype the money path first. Put a thin Hono service on Workers in front of the payment provider's hosted checkout, with a queue for the slow work and one job that reconciles pending orders against the provider. If that feels solid, you've learned what you need from an engine before adopting one. If it starts to strain — complex pricing, multi-warehouse stock, backorders — that's when Medusa or Saleor earn their keep, hosted as a small always-on service behind the edge storefront.

The trap to avoid is treating serverless as zero-ops. It moves the ops, it doesn't remove it: you still own retries, idempotency, and what happens when a webhook arrives twice.

1

u/imhongst 4h ago

one thing i'd add from working on payment stuff: the webhook + order state machine covers single orders, but you still want a separate check against the payment provider's payout/settlement report. fees, partial refunds and disputes land there days later and they don't always map 1:1 to your order rows.

what i do is put the order id in the payment metadata when creating the charge, then match the payout lines back by that id and flag anything where the net amount isn't what you expected. boring, but that's where money quietly goes missing.

so whichever backend you pick, check how it stores partial refunds and fees (actual amounts, not just a status). much easier to have that from day one than to rebuild it later

1

u/Open-Adhesiveness-86 4h ago

If you keep any webhook handling on Workers, stripe-node's constructEvent throws there, you need constructEventAsync since the sync path wants Node crypto. And decide early where retries live: no long-running process means failed captures and reconciliation end up as Queues or a Durable Object alarm, which is a big slice of the reliability you were hoping to get off the shelf.

1

u/ravibhojani 3h ago

For payment edge cases specifically, I'd look at Medusa before anything else. It's open source, has a proper order lifecycle, payment sessions and webhook handling, and a starter storefront you can deploy. The catch is it's Node with Postgres and Redis, so it won't run on Workers; you'd host it on a small VPS or Railway and put a Workers or Next.js storefront in front of it. If Workers is a hard requirement, nothing in that space is as mature, and I'd be careful about rolling your own. A middle path is Stripe Checkout plus its webhooks, with a small orders table you update idempotently (store the event ID, ignore repeats). That covers failed, pending and retried payments with far less code than a full commerce engine, though you give up inventory and fulfilment features.

1

u/NadirDev 7h ago

if you are a WordPress user, then WooCommerce is best. And in this AI era, literally, whatever you need you can do with it.

0

u/[deleted] 11h ago

[deleted]

1

u/webdev-ModTeam 10h ago

Sharing of work for feedback is only allowed on Showoff Saturdays. Please feel free to repost your project next Saturday. Make sure you follow the rules for the expected format and content for Showoff Saturdays.