Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@vicacha-devs/medusa-plugin-b2b

Latest version: v0.1.1

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
npm package Publisher: yusufmuysca
0 Stars
0 Forks
4 Versions
TypeScript Repo language

Scan summary

@vicacha-devs/medusa-plugin-b2b was last scanned on 23 Nov 2026 at version 0.1.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 4 versions, all published on 23 Nov 2026.
  • Findings: No rules fired in version 0.1.1.

Versions

4 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.1 LATEST 23 Nov 2026 No rules fired
0.1.0 23 Nov 2026 No rules fired
0.0.1 23 Nov 2026 No rules fired
0.0.0-stage 23 Nov 2026 Not shown

No rules fired in 0.1.1

Findings

Findings for v0.1.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@vicacha-devs/medusa-plugin-b2b

B2B commerce capabilities for Medusa v2: companies, employees, spending limits, quote negotiation, multi-level cart approvals, and a full admin UI — all as a self-contained, droppable plugin.

Medusa compatibility: 2.18.x — keep peer dependencies aligned with your host application.


Contents

  • Features
  • Requirements
  • Installation
  • Path Aliases
  • Architecture
  • Modules
  • Entity Links
  • Workflows
  • REST API
  • Admin UI
  • Development
  • Roadmap
  • License

Features

  • Company management — companies with name, contact info, address, logo, and currency
  • Employee roster — link customers to companies with per-employee spending limits
  • Customer-group sync — each company is backed by a Medusa CustomerGroup for price-list targeting
  • Spending limits — configurable per-employee caps with reset windows (daily → yearly)
  • Cart approval flow — require admin or sales-manager approval before a cart can be completed
  • Quote negotiation — request-for-quote lifecycle with draft-order editing, messaging, and acceptance
  • Workflow hooks — cart and order creation hooks that attach B2B context automatically
  • Admin UI — overview dashboard, companies list + detail, quote list + detail + management, approval queue
  • Dual API surface — /admin/b2b/* (Medusa admin JWT) and /store/b2b/* (customer session/bearer)
  • Role enforcement — company_admin middleware guards company-mutating store routes
  • Free-shipping price API — expose threshold prices to storefronts without custom logic

Requirements

Dependency Version
@medusajs/medusa 2.18.x
Node ≥ 20
pnpm 11.x (or npm/yarn — adjust scripts accordingly)

Installation

pnpm add @vicacha-devs/medusa-plugin-b2b

Register the plugin in medusa-config.ts:

import { defineConfig } from "@medusajs/framework/utils"

export default defineConfig({
  plugins: [
    {
      resolve: "@vicacha-devs/medusa-plugin-b2b",
      options: {},
    },
  ],
})

Run migrations after adding the plugin:

medusa db:migrate
Seeding demo data

A seed script is included to create default customer groups, a B2B sales channel, and a base region with shipping options:

medusa exec ./src/scripts/seed-b2b-data.ts

Path Aliases

The plugin ships with @/* path aliases for both backend and admin code.

Context Alias Resolves to
Backend (server) @/* src/*
Admin (React) @/* src/admin/*

TypeScript — aliases are configured in both tsconfig.json (backend) and src/admin/tsconfig.json (admin) and take effect immediately for type-checking.

Build — the build script runs tsc-alias after medusa plugin:build to rewrite alias paths in the compiled .js output:

pnpm build          # medusa plugin:build → tsc-alias rewrite
pnpm resolve:aliases  # run the alias rewrite step in isolation

Admin Vite — to resolve @/* aliases in the admin bundle, add the following to the host application's medusa-config.ts:

import path from "path"

export default defineConfig({
  admin: {
    vite: () => ({
      resolve: {
        alias: {
          "@": path.resolve(
            __dirname,
            "node_modules/@vicacha-devs/medusa-plugin-b2b/src/admin"
          ),
        },
      },
    }),
  },
})

Architecture

The plugin registers three custom modules and a set of entity links that tie them to Medusa's core data model.

Medusa Core
  Cart  ──────────── (link) ─────────────── b2b_approval
  Order ──────────── (link) ──┐              ├─ Approval (N per cart, type: admin | sales_manager)
  Customer ──────── (link) ───┤              ├─ ApprovalSettings (1 per company)
  CustomerGroup ──── (link) ──┘              └─ ApprovalStatus (1 per cart)
        │
        │                 b2b_company
        └──────────────── Company
                            ├─ Employee (N)
                            │   └─ (link) ── Customer
                            └─ (link) ── CustomerGroup
                            └─ (link) ── Cart[]
                            └─ (link) ── Order[]
                            └─ (link) ── ApprovalSettings

                          b2b_quote
                            Quote
                            ├─ Message[]
                            └─ (virtual links)
                                ├─ draft Order
                                ├─ Cart
                                ├─ OrderChange
                                └─ Customer
Quote lifecycle
Customer  →  POST /store/b2b/quotes               →  createRequestForQuoteWorkflow
                                                      ├─ Snapshot cart → draft Order + OrderChange
                                                      └─ Create Quote (status: pending_merchant)

Merchant  →  (edit items/pricing via Order Edit)
          →  POST /admin/b2b/quotes/:id/send       →  status: pending_customer

Customer  →  GET /store/b2b/quotes/:id/preview     →  previewOrderChange (live cost breakdown)
          →  POST /store/b2b/quotes/:id/accept      →  customerAcceptQuoteWorkflow
                                                         ├─ confirmOrderEditRequestWorkflow
                                                         └─ draft Order → PENDING (live)
          →  POST /store/b2b/quotes/:id/reject      →  status: customer_rejected
Approval lifecycle
Company admin enables requires_admin_approval on ApprovalSettings

Employee  →  POST /store/b2b/carts/:id/approvals    →  createApprovalsWorkflow
                                                         ├─ Approval + ApprovalStatus records
                                                         └─ Links to Cart

            Cart is now locked:
              addToCartWorkflow.hooks.validate       →  blocks if approval pending
              completeCartWorkflow.hooks.validate    →  blocks if pending OR spending limit exceeded

Admin     →  POST /admin/b2b/approvals/:id          →  updateApprovalsWorkflow
          →  Cart unlocked, employee can complete checkout

Modules

b2b_company

Manages companies and their employees.

Company

Field Type Notes
id string comp_ prefix
name string
email string
phone string nullable
address string nullable
city string nullable
state string nullable
zip string nullable
country string nullable
logo_url string nullable
currency_code string nullable
spending_limit_reset_frequency enum never \| daily \| weekly \| monthly \| yearly (default: monthly)

Employee

Field Type Notes
id string emp_ prefix
spending_limit BigNumber 0 = unlimited
is_admin boolean grants company_admin role
company_id FK → Company

Service: ICompanyModuleService — full CRUD via MedusaService: createCompanies, updateCompanies, deleteCompanies, listCompanies, retrieveCompany, createEmployees, updateEmployees, deleteEmployees, listEmployees, retrieveEmployee.


b2b_quote

Manages request-for-quote threads between customers and merchants.

Quote

Field Type Notes
id string quo_ prefix
status enum pending_merchant \| pending_customer \| accepted \| customer_rejected \| merchant_rejected
customer_id string
draft_order_id string Medusa draft Order
order_change_id string active OrderChange
cart_id string originating Cart

Message

Field Type Notes
id string mess_ prefix
text string
item_id string nullable — optional line-item reference
admin_id string nullable — set when sent by admin
customer_id string nullable — set when sent by customer

Service: IQuoteModuleService — full CRUD for Quote and Message.


b2b_approval

Manages cart approval gates and company-level approval configuration.

ApprovalSettings

Field Type Notes
id string apprset_ prefix
company_id string
requires_admin_approval boolean default: false
requires_sales_manager_approval boolean default: false

Approval

Field Type Notes
id string appr_ prefix
cart_id string
type enum admin \| sales_manager
status enum pending \| approved \| rejected
created_by string customer who submitted
handled_by string nullable — admin or manager who acted

ApprovalStatus

Aggregate status for a cart — denormalized for fast lookup by cart hooks.

Field Type Notes
id string apprstat_ prefix
cart_id string
status enum pending \| approved \| rejected

Service: IApprovalModuleService — full CRUD + hasPendingApprovals(cartId): Promise<boolean>.


Entity Links

Link Left Right Cardinality
employee-customer Employee (b2b_company) Customer (core) 1 : 1
company-customer-group Company (b2b_company) CustomerGroup (core) 1 : 1
company-carts Company (b2b_company) Cart (core) 1 : N
order-company Order (core) Company (b2b_company) 1 : 1
company-approval-setting Company (b2b_company) ApprovalSettings (b2b_approval) 1 : 1
cart-approvals Cart (core) Approval (b2b_approval) 1 : N
cart-approval-status Cart (core) ApprovalStatus (b2b_approval) 1 : 1

Quote → Order, Cart, OrderChange, Customer, and User relationships are registered as read-only virtual links via MedusaModule.setCustomLink.


Workflows

Company
ID Description
create-companies Creates a company and its linked ApprovalSettings in a single atomic operation
update-companies Updates company fields
delete-companies Deletes company and its associated ApprovalSettings
add-company-to-customer-group Adds all current employees to the company's linked CustomerGroup
remove-company-from-customer-group Removes all employees from the linked CustomerGroup
Employee
ID Description
create-employees Creates an employee record, links it to a Customer, optionally sets company_admin role, and adds the customer to the company's CustomerGroup
update-employees Updates spending_limit or is_admin
delete-employees Removes the employee record
Quote

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @vicacha-devs/medusa-plugin-b2b

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Frame 2085668439 (1)
Group 1261154229