Foundry ims
Foundry IMS integration for Medusa — push orders, inventory, and fulfillments to Foundry in real time.
medusa-plugin-foundry-ims
Real-time integration between Medusa and Foundry IMS. Pushes order, inventory, and fulfillment events from your Medusa store to Foundry the moment they happen — replaces polling with native Medusa event subscribers.
What this plugin does
Subscribes to Medusa events and forwards them to your Foundry workspace:
| Medusa event | What Foundry does |
|---|---|
| Imports the order, creates inventory reservations | |
| Updates order status, transitions reservations on shipment/refund | |
| Releases all active reservations | |
| Records the tracking number against the order |
The plugin sends a thin event envelope (); Foundry refetches the full order from your Medusa admin API for the rest. Your Foundry API key is the auth — no separate webhook secret to manage.
Requirements
- Medusa v2.3.0+ (plugin support landed in 2.3.0)
- Node 20+
- A Foundry IMS account at foundryims.com with:
- A channel created (Sales Channels → Add Channel → Medusa)
- An API key (Settings → API Keys → Create)
Install
In your :
Configure
The plugin reads three environment variables:
| Var | Required | Default | Where to get it |
|---|---|---|---|
| yes | — | Foundry → Settings → API Keys → Create. Starts with . | |
| yes | — | Foundry → Sales Channels → Medusa → URL contains the channel UUID. | |
| no | Override only for self-hosted or staging Foundry instances. |
Add to your Medusa server's :
Restart your Medusa server. Place a test order — Foundry should receive it within ~1 second.
Verifying the connection
After a test order:
You should see your order in the response. If not, check your Medusa logs for warnings — usually a missing env var.
Troubleshooting
Plugin warns "FOUNDRY_API_KEY and FOUNDRY_CHANNEL_ID must be set..." on startup. The plugin couldn't find one or both required env vars. Double-check your and that you've restarted Medusa.
Orders aren't appearing in Foundry.
- Confirm the API key is valid (curl test above).
- Confirm the channel ID matches the one shown in Foundry's URL.
- Check Medusa server logs for .
- Confirm is on for the Foundry channel (Foundry → Sales Channels → Medusa → Settings).
The plugin works but Foundry shows the wrong status / out-of-date inventory. Foundry refetches via the Medusa admin API on every event. Make sure the configured on the Foundry channel is still valid (Settings → Foundry → Sales Channels → Medusa → Edit credentials).
What this plugin does NOT do
- It does not push outbound changes (Foundry → Medusa). That direction is handled by Foundry's existing Medusa adapter.
- It does not provide an admin UI inside Medusa (yet — coming in v0.2.0).
- It does not have built-in retry logic for failed posts (yet — coming in v0.3.0). For now, Foundry's 5-minute order-sync cron is the safety net.
Roadmap
- v0.2.0 — Admin widget inside Medusa Settings: configure API key + channel ID without env vars.
- v0.3.0 — Retry queue for failed event posts. Health-check endpoint. Inventory + product subscribers.
Support
License
MIT

