# B2B Wholesale & Distributor Margin Stack Calculator

> B2B Wholesale & Distributor Margin Stack Calculator is a paid API for AI agents from x402-niche-briefs.fly.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-30).

Calculates wholesale unit pricing, brand gross margins, MOQ order values, and distributor-tier margin stack given MSRP, COGS, wholesale discount, and MOQ inputs

## Facts

- Endpoint: GET https://x402-niche-briefs.fly.dev/v1/wholesale-moq-margin-check?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/b2b-wholesale-distributor-margin-stack-calculator-ef8e7c5c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qyPegd7o1OhjR50QC_-sH

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability b2b-wholesale-distributor-margin-stack-calculator-ef8e7c5c
```

Example prompt: Run a wholesale margin stack analysis for my product: MSRP is $40, COGS is $7.50, I'm offering a 50% keystone wholesale discount, and my MOQ is 100 units — show me the brand margin, MOQ order value, and what happens when a distributor takes a 25% cut.

## When to prefer this

Choose this endpoint when you need fast, deterministic B2B wholesale margin calculations without setting up a spreadsheet or financial model — especially for CPG, ecommerce, or consumer product brands evaluating keystone pricing, distributor channel economics, or MOQ profitability. It is purpose-built for the wholesale margin stack use case (MSRP → wholesale → distributor) and includes a MAP policy readiness check not typically found in generic margin calculators.

## Known failure modes

- Missing required query parameter (msrp_usd, unit_cogs_usd, wholesale_discount_pct, or moq_units) returns a 400 error
- Non-numeric string values for numeric parameters may cause a 400 or 422 error
- COGS exceeding wholesale unit price results in negative margin output (not an error, but indicates unprofitable pricing)
- Payment failure via x402 protocol (insufficient USDC balance) blocks the request
- Very large MOQ values or extreme discount percentages may produce edge-case outputs but should compute deterministically

## How this service works

Deterministic B2B wholesale keystone & distributor margin stack calculator. Pass ?msrp_usd=40&unit_cogs_usd=7.50&wholesale_discount_pct=50&moq_units=100. Returns wholesale unit price, brand gross profit/margin, MOQ order value, distributor-tier margin (at 25% distributor cut), and MAP policy readiness checklist.

## Output

Returns a structured JSON object with: (1) echoed inputs, (2) direct wholesale tier metrics — wholesale unit price, gross profit per unit, brand gross margin %, MOQ order revenue, and MOQ order gross profit, (3) distributor tier metrics at 25% distributor margin — sell-to-distributor price, brand gross profit per unit with distributor, and brand gross margin % with distributor, and (4) a MAP policy readiness checklist indicating whether the pricing structure is compatible with minimum advertised price enforcement.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "msrp_usd",
      "unit_cogs_usd",
      "wholesale_discount_pct",
      "moq_units"
     ],
     "properties": {
      "msrp_usd": {
       "type": "string",
       "description": "Suggested retail price (MSRP) in USD"
      },
      "moq_units": {
       "type": "string",
       "description": "Minimum order quantity (MOQ) in units"
      },
      "unit_cogs_usd": {
       "type": "string",
       "description": "Landed COGS per unit in USD"
      },
      "wholesale_discount_pct": {
       "type": "string",
       "description": "Wholesale discount off MSRP (default 50 for keystone)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "as_of",
      "inputs",
      "direct_wholesale_tier",
      "distributor_tier_25pct_margin",
      "wholesale_readiness_checklist"
     ],
     "properties": {
      "as_of": {
       "type": "string"
      },
      "inputs": {
       "type": "object",
       "required": [
        "msrp_usd",
        "unit_cogs_usd",
        "wholesale_discount_pct",
        "moq_units"
       ],
       "properties": {
        "msrp_usd": {
         "type": "number"
        },
        "moq_units": {
         "type": "number"
        },
        "unit_cogs_usd": {
         "type": "number"
        },
        "wholesale_discount_pct": {
         "type": "number"
        }
       }
      },
      "direct_wholesale_tier": {
       "type": "object",
       "required": [
        "wholesale_unit_price_usd",
        "gross_profit_per_unit_usd",
        "brand_wholesale_gross_margin_pct",
        "moq_order_revenue_usd",
        "moq_order_gross_profit_usd"
       ],
       "properties": {
        "moq_order_revenue_usd": {
         "type": "number"
        },
        "wholesale_unit_price_usd": {
         "type": "number"
        },
        "gro
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/b2b-wholesale-distributor-margin-stack-calculator-ef8e7c5c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-niche-briefs.fly.dev](https://www.zero.xyz/host/x402-niche-briefs.fly.dev/llms.txt)
