How Pricing Works

Updated 11 July 2026

This chapter explains how the plugin selects a tier and calculates the final unit price – so you can validate prices and explain them to customers.

Tier matching (step by step)

Rule priority details

Specificity scoring

When several rules qualify, the plugin scores each:

Higher score wins. If scores tie, higher min_qty wins (more specific tier).

Overlapping ranges

Warning Overlapping quantity ranges are allowed but not recommended. When ranges overlap, the tier with the highest min_qty that still fits the quantity wins. Example: Rules 1–50 @ $10 and 25–100 @ $8. At qty 30, both match → $8 wins (higher min_qty).

Price formulas

Base price (for discount types)

Resolved in this order:

If no base is available for a discount tier, calculation may fail or show incomplete preview in Admin.

Rounding & tax

Edge cases

Store API

List tiers

GET /store/quantity-pricing?product_id=prod_01XXX&variant_id=variant_01XXX¤cy_code=usd

Requires a publishable API key.

Calculate price for quantity

GET /store/quantity-pricing?product_id=prod_01XXX¤cy_code=usd&quantity=25

Response includes calculated_price:

{
  "quantity_prices": [...],
  "calculated_price": {
    "unit_price": 90,
    "quantity": 25,
    "currency_code": "usd",
    "rule_id": "qprice_02...",
    "pricing_type": "fixed",
    "line_total": 2250
  }
}

Optional parameters

Validation checklist

Before going live, verify: