Skip to main content
In this guide, you’ll learn how to create a store from your own server code. This is useful in a seed script, a custom API route, or an onboarding flow. Mercur exposes a createSellersWorkflow that creates the Seller record along with its defaults. Run it from any place that has access to the Medusa container.

Run the workflow

src/api/custom/route.ts
An operator can set a new store to open right away. A store created through the public self-registration flow starts in pending_approval and waits for operator review. See Moderate stores.

Attach custom data

The workflow accepts an additional_data payload. It is passed to the workflow’s hooks, so you can persist marketplace-specific data alongside the store without forking the workflow.