Skip to main content
Medusa is an open-source, self-hosted commerce platform. SourceMedium connects to your Medusa store with a secret API key and your backend base URL.
You connect data sources yourself in SourceMedium. Sign in to your SourceMedium account, open your store, then in the Data sources section click Connect data source and choose the platform. You need an Editor or Admin role on the store. If you have view-only access, ask an admin or editor on your team to connect it.Once it is connected, what happens next covers first-sync timing and what each connection status means.

How to connect

Paste your Medusa API key and backend base URL in SourceMedium. Do not email those values.
1

Create a secret API key in Medusa

In Medusa admin, go to Settings → Secret API Keys and click Create. Copy the key from the pop-up; you will not see it again. Medusa’s own guide: Manage Secret API Keys. If you use a read-only reporting projection instead, use that projection’s publishable key and confirm the /reporting routes with the checklist below.
2

Find your backend base URL

This is the root of your Medusa server, for example https://store.yourdomain.com. If you only know the admin dashboard URL, drop a trailing /app.
3

Add both values in SourceMedium

Find Medusa in the connector picker and click Connect. Enter:
  • API key: the secret or publishable key from the previous step
  • Base URL: https://store.yourdomain.com
Click Connect. SourceMedium checks the credentials before saving them.
4

Confirm it is connected

The connection reads Awaiting first data until the first sync lands, then Connected.
SourceMedium only ever reads from your connected platforms. It does not create, change, or delete anything, so create the key with read-only access wherever the platform offers it. Treat it like a password: keep it confidential and avoid sharing it over email or in spreadsheets. If the credential is rotated or revoked, follow this guide’s connection method to update SourceMedium.

What data syncs

  • Orders, including line items, shipping lines, fulfillments, and refunds
  • Customers
  • Products and variants
  • Inventory items and levels
  • Subscriptions, when your store runs a subscription module that exposes them

Projection requirements (for your developer)

Expose a /reporting API on the store’s Medusa backend meeting this exact contract. Every requirement below comes from a production-validated integration. Meeting them up front means validation passes on the first try.

1. Authentication

  • Requests carry the store’s publishable API key in the x-publishable-api-key header.
  • The projection must reject requests without a valid key.

2. Routes and response envelope

Expose these five GET routes: Every route must:
  • Support offset/limit pagination: ?limit=200&offset=0 (limit up to 200).
  • Respond with the envelope { "<resource>": [...], "count": N, "offset": n, "limit": l }, where count is the total number of records. The <resource> key matches the route name for every route except /reporting/inventory, whose key is inventory_items.
  • Return records in a stable sort order (for example, created_at descending) so paginated reads are consistent.

3. Order filtering (required for backfill)

/reporting/orders must accept created_from and created_to ISO-8601 query params and filter server-side, both bounds inclusive:
SourceMedium uses these to backfill history in 30-day windows. Without them, historical backfill is not possible.

4. Order payload

Each order must include all of the following. Fields marked Commonly missed are the ones that most often fail validation. Each was a real issue that blocked or delayed a past onboarding.

5. Subscriptions (only for stores with subscriptions)

  • /reporting/subscriptions returns all subscription records with created_at and updated_at.
  • Subscription currency and money fields must use their native source values. SourceMedium applies reporting-currency conversion downstream when it is enabled for the workspace.
  • There must be a way to link a recurring order to its subscription, typically a subscription ID in the order’s metadata. The exact metadata keys are merchant-specific; SourceMedium reviews them during onboarding.
  • Note: subscription history only covers what your subscription module has synced into Medusa. If your provider started syncing recently, SourceMedium reports from that point forward.

6. Self-test checklist

Before handing off to SourceMedium, verify all of the following with curl:
Then confirm, by inspecting real responses:
  • A recent completed order has non-zero total, subtotal, item_total, and non-empty items[] with non-null quantity.
  • An order from your oldest month of business also has computed money totals and non-empty items[] (not header-only).
  • A refunded order has a top-level refunds[] array with the refund amount.
  • A canceled order has canceled_at populated.
  • An order with a partial capture has captures[] entries and net_captured set.
  • /reporting/products includes variants[] with prices[].
  • /reporting/inventory includes location_levels[].
  • All five routes reject a request with a missing or invalid key.

Data coverage notes

  • Returns and exchanges are not currently collected for Medusa stores.
  • Marketing attribution: Medusa has no built-in customer-journey source, so attribution models receive no Medusa-native input.
  • After the initial backfill, SourceMedium syncs your Medusa data automatically every 6 hours.

Troubleshooting

  • Validation failed on money fields? The projection is returning 0 or null instead of computed totals. This is the most common issue. Your developer must compute totals on the backend, including for historical orders.
  • Revenue looks off by 100x? Currency units were not confirmed. Contact your account manager to re-verify whether your projection emits major or minor units.
  • Old orders have no line items? The projection is only hydrating items[] for recent orders. It must hydrate them for all history.
  • Need to rotate a key? Create a new key in your Medusa Admin (Settings → Secret API Keys, or Publishable API Keys for a reporting projection) then paste it in SourceMedium on the Medusa connection (Reconnect). The new key replaces the stored credential with no data loss.