Api Endpoint

B2B Wholesale & Distributor Margin Stack Calculator

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.

Open interactive test console

Offering

Provider
x402-niche-briefs.fly.dev
Method
GET
Offering type
Api Endpoint
Transport type
http
Category
Other
Delivery
Not provided
Pricing model
Not provided
x402 version
2

Endpoint context

URL
https://x402-niche-briefs.fly.dev/v1/wholesale-moq-margin-check
MIME type
application/json
First seen
2026-11-01T15:23:28.507Z
Last seen
Tags
wholesale, B2B, margin, moq, map-policy, pricing, calculator

Payment pricing

x402 payment terms are the authoritative price for calling this endpoint.

Payment option 1
0.01 USDC
Atomic price: 10000 · Network: eip155:8453 · Asset: USDC · Scheme: exact
Raw x402 terms
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "10000",
    "payTo": "0x847f54ae8dDFD71ed7bC930C1f7a73576FAb03A9"
  }
]

Observed health

Status
Healthy
Latest latency
104 ms
Average latency
104 ms
HTTP status
402
Last checked
Reachability
100% over 1 checks

Latency is measured to the first response headers. A reachable result does not verify response accuracy or merchant identity.

Input schema

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "http"
    },
    "method": {
      "type": "string",
      "enum": [
        "GET"
      ]
    },
    "queryParams": {
      "type": "object",
      "properties": {
        "msrp_usd": {
          "type": "string",
          "description": "Suggested retail price (MSRP) in USD"
        },
        "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)"
        },
        "moq_units": {
          "type": "string",
          "description": "Minimum order quantity (MOQ) in units"
        }
      },
      "required": [
        "msrp_usd",
        "unit_cogs_usd",
        "wholesale_discount_pct",
        "moq_units"
      ]
    }
  },
  "required": [
    "type",
    "method"
  ],
  "additionalProperties": false
}

Output schema

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string"
    },
    "example": {
      "type": "object",
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "properties": {
        "as_of": {
          "type": "string"
        },
        "inputs": {
          "type": "object",
          "properties": {
            "msrp_usd": {
              "type": "number"
            },
            "unit_cogs_usd": {
              "type": "number"
            },
            "wholesale_discount_pct": {
              "type": "number"
            },
            "moq_units": {
              "type": "number"
            }
          },
          "required": [
            "msrp_usd",
            "unit_cogs_usd",
            "wholesale_discount_pct",
            "moq_units"
          ]
        },
        "direct_wholesale_tier": {
          "type": "object",
          "properties": {
            "wholesale_unit_price_usd": {
              "type": "number"
            },
            "gross_profit_per_unit_usd": {
              "type": "number"
            },
            "brand_wholesale_gross_margin_pct": {
              "type": "number"
            },
            "moq_order_revenue_usd": {
              "type": "number"
            },
            "moq_order_gross_profit_usd": {
              "type": "number"
            }
          },
          "required": [
            "wholesale_unit_price_usd",
            "gross_profit_per_unit_usd",
            "brand_wholesale_gross_margin_pct",
            "moq_order_revenue_usd",
            "moq_order_gross_profit_usd"
          ]
        },
        "distributor_tier_25pct_margin": {
          "type": "object",
          "properties": {
            "sell_to_distributor_unit_price_usd": {
              "type": "number"
            },
            "brand_gross_profit_per_unit_usd": {
              "type": "number"
            },
            "brand_gross_margin_with_distributor_pct": {
              "type": "number"
            }
          },
          "required": [
            "sell_to_distributor_unit_price_usd",
            "brand_gross_profit_per_unit_usd",
            "brand_gross_margin_with_distributor_pct"
          ]
        },
        "wholesale_readiness_checklist": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "as_of",
        "inputs",
        "direct_wholesale_tier",
        "distributor_tier_25pct_margin",
        "wholesale_readiness_checklist"
      ]
    }
  },
  "required": [
    "type"
  ]
}