Back to Lab
11 min

Why We Chose Medusa for a B2B Wholesale Store — Comparing Cost and Customizability with Shopify Plus

Why we built MU COFFEE, a B2B wholesale store for specialty coffee, on Medusa v2 instead of Shopify. Faced with complex requirements — wholesale pricing, deferred payment, member-specific catalogs — we compare Shopify Plus and headless commerce on monthly cost, customizability, and lock-in. (Medusa case study series, part 1)

MedusaHeadless CommerceB2BShopifyCommerce

Why We Chose Medusa for a B2B Wholesale Store

At gKnowsis we built MU COFFEE, a B2B wholesale store for specialty coffee, on Medusa v2. For an ordinary online shop, Shopify or a hosted SaaS would be plenty. We deliberately chose the headless commerce engine Medusa anyway — and for clear reasons.

In this series we share what we learned building it, across three parts. This first article covers platform selection and the criteria behind it.

This series is not an argument that "Medusa is always right." Depending on the requirements, Shopify is the better choice. What matters is determining which side your requirements fall on.

The requirements: three walls off-the-shelf commerce couldn't bend

MU COFFEE's requirements differed sharply from a typical B2C shop.

  1. Per-member pricing — the same product is discounted differently depending on the customer group or individual contract. Category-level discounts exist too.
  2. B2B deferred payment — beyond credit cards, we needed credit-checked "pay later" (Paid) settlement.
  3. Per-customer product visibility — some products are shown only to specific customers; others are hidden from specific customers.

On top of that came Japan-specific B2B realities: tax-inclusive pricing, the reduced 8% tax rate, member-specific free-shipping thresholds, and subscriptions.

These went beyond "just add an app." They required rewriting the pricing and checkout logic itself. That is the fork in the road for platform selection.

Shopify Plus as an option

Shopify is an excellent platform, and its B2B capabilities improve every year. With Shopify Plus B2B features you can achieve catalog-specific pricing, company accounts, and payment terms largely without code.

Applied to MU COFFEE's requirements, however, several constraints surfaced.

DimensionShopify PlusMedusa v2 (headless)
Monthly license~$2,300/mo and up (annual; varies with FX)No license fee (OSS, MIT)
Running costFixed monthly + transaction feesActual hosting (server/DB/Redis) + dev & maintenance
Pricing flexibilityFlexible within bounds (catalogs, volume). Logic outside the bounds is constrainedImplement anything server-side
CheckoutExtensible on Plus, but deep payment-flow changes are limitedFully controlled via your own API
Custom payment (e.g. deferred)Depends on apps; Japanese credit-based BNPL options are limitedBuild/integrate any payment provider
Data ownership / migrationWithin the platformDB self-managed (PostgreSQL)
Lock-inHighLow (standard Node/TS assets)

The monthly cost of Shopify Plus is not the problem in itself. The problem is the case where "even after paying the monthly fee, what you want still doesn't fit within the bounds." When you need to rewrite the deep parts of pricing or checkout, the SaaS abstraction becomes a constraint instead of a help.

What Medusa is

Medusa is an open-source, TypeScript headless commerce engine. Unlike Shopify's "admin + fixed storefront," Medusa provides the commerce backend (an API). You build the frontend freely (MU COFFEE uses Next.js 15).

Medusa v2's building blocks are simple:

  • Module — a unit of domain logic (products, inventory, orders…)
  • Workflow — multi-step business logic (with compensation)
  • API Route — file-based custom endpoints (/store/*, /admin/*)
  • Subscriber — event-driven handlers (e.g. shipment completed → capture payment)

The key point: all of this is written in plain TypeScript. How prices are computed, what checkout validates, how an external payment provider is called — all of it becomes your own code.

The core of the MU COFFEE implementation

We crossed each requirement wall with Medusa's custom logic. The essentials first (details in parts 2 and 3):

  • Wholesale discounts are applied by the server at billing time — the frontend never sends prices. A custom API, checkout/init, recomputes each line item's unit price from the authenticated customer's discount rate. Display, billing, and confirmation email always match.
  • Paid deferred payment is integrated via an API proxy + a Subscriber — credit checks, registration, and capture are mediated by Medusa API Routes, and payment is captured automatically on the shipment-completed event.
  • Shipping is chosen by the server — retail ¥250 / wholesale ¥880 / free ¥0, determined server-side from customer attributes, leaving no room for frontend tampering.
// Wholesale discount priority (conceptual)
// individual customer > customer group (max) > region default
const rate =
  customer.metadata?.discount_rate ??
  maxGroupDiscountRate(customer.groups) ??
  region.metadata?.default_discount_rate ??
  0

A design where "the server decides the price" is hard to achieve within a SaaS's bounds. That is the single biggest reason we chose Medusa.

Which should you choose — a quick guide

Platform selection is a question of fit, not superiority. The more of these apply, the better Medusa (headless) fits.

When Shopify / Shopify Plus fits

  • Standard B2C, or routine B2B (catalog-level pricing)
  • You want to launch fast with low upfront cost
  • You want to minimize operations and maintenance
  • You have no in-house development resources

When Medusa (headless) fits

  • You need custom logic in pricing or checkout
  • You want to integrate special payment methods, such as Japanese deferred payment
  • You want to avoid monthly licenses and keep running costs to actual usage
  • You want to self-manage data and avoid lock-in
  • You expect to keep building features (you have, or can contract, dev resources)

MU COFFEE clearly fell into the latter. So we chose Medusa and, as a result, delivered the requirements fully custom with no monthly license fee.

Summary

  • Shopify Plus is powerful, but for requirements that deeply rewrite pricing and checkout, the bounds become a constraint
  • Medusa lets you own the commerce logic in plain TypeScript. The license is free, but it assumes a development and maintenance setup
  • Selection is about fit, not superiority. Everything hinges on determining which side your requirements fall on

Next (part 2), we go into the Paid deferred-payment integration touched on here, diving into the API Route and Subscriber implementation.


Need headless commerce on Medusa, B2B features, or deferred-payment integration — built in Japan? Talk to gKnowsis. We work with both domestic and overseas clients and support you end to end, from judging whether "off-the-shelf commerce can bend to your requirements" through design, implementation, and operations.