Skip to main content
The Seller module owns the marketplace vendor domain: the seller entity and its satellite records (professional details, address, payment details), the seller’s team (members and pending invites), and the order group — the aggregate that binds the per-seller orders created from a single multi-vendor cart. For the conceptual introduction, see Sellers, Seller members, and Order groups.

Data models

Seller

Table seller, ID prefix sel.
FieldTypeNotes
idtextPrimary key
nametextUnique, searchable
handletextUnique, URL-friendly; auto-generated from name when omitted
emailtextUnique, searchable
phonetextNullable
descriptiontextNullable
logotextNullable
bannertextNullable
website_urltextNullable
external_idtextNullable; unique when set
currency_codetextThe seller’s single operating currency
statusenumSellerStatus, default pending_approval
status_reasontextNullable
approved_atdateTimeNullable
rejected_atdateTimeNullable
is_premiumbooleanDefault false; operator-set only
closed_from / closed_todateTimeNullable; scheduled closure window
closure_notetextNullable
metadatajsonNullable
Relations: professional_details, address, and payment_details (one-to-one, deleted with the seller), members (many-to-many through SellerMember), member_invites (one-to-many, deleted with the seller).

ProfessionalDetails

Table professional_details, ID prefix selprodet. Presence of this record marks the seller as a registered business.
FieldType
corporate_nametext, nullable
registration_numbertext, nullable
tax_idtext, nullable

SellerAddress

Table seller_address, ID prefix seladdr. Fields: name, company, first_name, last_name, address_1, address_2, city, country_code, province, postal_code, phone, metadata — all nullable.

PaymentDetails

Table payment_details, ID prefix selpaydet. Fields: country_code, holder_name, bank_name, iban, bic, routing_number, account_number — all nullable.

Member

Table member, ID prefix mem. A member is a dashboard user that can belong to one or more sellers.
FieldTypeNotes
emailtextUnique, searchable
first_name / last_nametextNullable
localetextNullable
is_activebooleanDefault true
metadatajsonNullable

SellerMember

Table seller_member, ID prefix selmem. Pivot between Seller and Member; unique on (seller_id, member_id).
FieldTypeNotes
role_idtextNullable; resolved against the RBAC roles module
is_ownerbooleanDefault false
metadatajsonNullable

MemberInvite

Table member_invite, ID prefix meminv. Unique on (email, seller_id) while unaccepted.
FieldTypeNotes
emailtextSearchable
tokentextSigned JWT
acceptedbooleanDefault false
expires_atdateTimeDerived from invite_valid_duration
role_idtextRole assigned on acceptance
metadatajsonNullable

OrderGroup

Table order_group, ID prefix og. Created when a multi-vendor cart completes.
FieldTypeNotes
display_idautoincrementShopper-facing number
cart_idtextThe originating cart
customer_idtextNullable
seller_countnumberComputed
totalbigNumberComputed across child orders

Enums

enum SellerStatus {
  OPEN = "open",
  PENDING_APPROVAL = "pending_approval",
  SUSPENDED = "suspended",
  TERMINATED = "terminated",
}

enum SellerRole {
  SELLER_ADMINISTRATION = "role_seller_administration",
  INVENTORY_MANAGEMENT = "role_seller_inventory_management",
  ORDER_MANAGEMENT = "role_seller_order_management",
  ACCOUNTING = "role_seller_accounting",
  SUPPORT = "role_seller_support",
}
The seller is the anchor of the marketplace graph. Nearly every seller-scoped resource is connected through a module link rather than a foreign key:
Linked entityCardinalityPurpose
Product.productmany-to-many (product_seller)Selling-eligibility allowlist for master products
Order.orderone seller — many ordersPer-seller child orders
Payout.payoutone seller — many payoutsSettlements
Payout.payoutAccountone-to-oneThe seller’s provider account
Pricing.priceListone seller — many listsVendor price lists
Promotion.promotion / Promotion.campaignone seller — manyVendor promotions and campaigns
Inventory.inventoryItemone seller — many itemsVendor inventory
StockLocation.stockLocationone seller — manyVendor locations
Fulfillment.shippingProfile / shippingOption / fulfillmentSet / serviceZoneone seller — manyVendor shipping setup
Customer.customer / customerGroupmany-to-many / one seller — manyVendor customer base
Product.productCategorymany-to-manyCategories a seller may sell in
Order groups carry two additional links: a read-only link to the originating Cart (via cart_id) and a list link to the child Order records (table order_group_order). The SellerMember.role_id field is a read-only link into the RBAC roles module.

Service

SellerModuleService extends MedusaService with auto-generated CRUD for all models above, plus:
MethodBehavior
createSellers(data) / updateSellers(data)Validates the handle and auto-generates it from name when missing
upsertMembers(data)Dedupes by email, creates missing members, backfills empty names; returns members in input order
createMemberInvites(data)Rejects emails that already belong to the seller; issues a JWT token with an expiry
validateMemberInviteToken(token)Verifies the JWT and rejects accepted or expired invites
listOrderGroups / listAndCountOrderGroups / retrieveOrderGroupCustom repository-backed reads that resolve the computed seller_count and total fields

Module options

OptionTypeDefaultPurpose
invite_valid_durationnumber (seconds)7 daysMember invite lifetime
jwt_secretstringproject http.jwtSecretSigns invite tokens
vendor_urlstringMERCUR_VENDOR_URL env varVendor dashboard base URL used in invite links

Next steps

Commission module

Payout module