# Pricing Math – Stacked Discount Calculator

> Pricing Math – Stacked Discount Calculator is a paid API for AI agents from pricing-math.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Calculates the final price and effective discount when percentage discounts are applied sequentially (stacked), and compares that to a simple additive total of the same discounts.

## Facts

- Endpoint: GET https://pricing-math.x402tookit.com/discount-stack?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pricing-math-stacked-discount-calculator-86fc5c03
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vr_t3uh98jrZaSt2n7Yrd

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 pricing-math-stacked-discount-calculator-86fc5c03
```

Example prompt: What's the final price and effective discount if I stack a 20% discount and then a 10% discount on a $150 list price — and how does that compare to just adding the two percentages together?

## When to prefer this

Choose this endpoint when you need to understand the compounding effect of sequentially applied percentage discounts versus naive addition — especially useful in retail, B2B invoicing, or coupon-stacking scenarios where the order and chaining of discounts matters. It is more precise than manual calculation and provides a step-by-step audit trail. Prefer it over a generic calculator when you need both the stacked result and the additive comparison in one call.

## Known failure modes

- Missing required 'price' query parameter returns an error
- Missing or malformed 'discounts' parameter (not comma-separated numbers) causes a parse error
- Non-numeric values in the discounts string result in a validation failure
- Discount percentages outside 0–100 range may cause unexpected or erroneous results
- Network or service unavailability returns a non-200 status

## How this service works

Final price and effective discount when percentage discounts are stacked one after another, versus simply adding them.

## Output

Returns the final price after all discounts are applied sequentially, the effective discount percentage (true compounded rate), the simple additive discount percentage for comparison, total amount saved, a step-by-step breakdown of each discount stage (from/to price and discount applied), a human-readable summary and verdict, plus metadata like source and timestamp.

## 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": [
      "price",
      "discounts"
     ],
     "properties": {
      "price": {
       "type": "number",
       "description": "List price before discounts"
      },
      "discounts": {
       "type": "string",
       "description": "Comma-separated percent discounts applied in order, e.g. 20,10"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "steps": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        "properties": {
         "to": {
          "type": [
           "null",
           "number"
          ]
         },
         "from": {
          "type": [
           "null",
           "number"
          ]
         },
         "discountPct": {
          "type": [
           "null",
           "number"
          ]
         }
        }
       }
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "listPrice": {
       "type": [
        "null",
        "number"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "finalPrice": {
       "type": [
        "null",
        "number"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "amountSaved": {
       "type": [
    
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pricing-math-stacked-discount-calculator-86fc5c03/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pricing-math.x402tookit.com](https://www.zero.xyz/host/pricing-math.x402tookit.com/llms.txt)
