Catalog/budget-discount-vs-cashback

Calculators

Discount vs cashback comparison API

Compare an upfront percentage discount against a cashback percentage (effective price = price*(1-discount)*(1-cashback)) to find the cheaper single offer and the combined stacked price. Answers 'is 20% off better than 15% cashback', 'discount vs cashback on a $200 purchase', 'effective price with both offers stacked'.

Price$0.01per request
MethodPOST
Route/v1/calc/budget-discount-vs-cashback
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
budgetdiscountcashbackdealshoppingcomparisoncalculatormoney
API URLhttps://x402.hexl.dev/v1/calc/budget-discount-vs-cashback
Integration docs
Example request
{
  "price": 200,
  "discountPercent": 20,
  "cashbackPercent": 15
}
Example response
{
  "price": 200,
  "discountOnlyPrice": 160,
  "cashbackOnlyPrice": 170,
  "bothStackedPrice": 136,
  "betterSingleOffer": "discount",
  "savingsDifference": 10,
  "breakdown": [
    {
      "offer": "discount",
      "effectivePrice": 160,
      "saved": 40
    },
    {
      "offer": "cashback",
      "effectivePrice": 170,
      "saved": 30
    }
  ]
}
Input schema
{
  "type": "object",
  "required": [
    "price",
    "discountPercent",
    "cashbackPercent"
  ],
  "properties": {
    "price": {
      "type": "number",
      "description": "List price in dollars",
      "examples": [
        200
      ]
    },
    "discountPercent": {
      "type": "number",
      "description": "Upfront discount percent",
      "examples": [
        20
      ]
    },
    "cashbackPercent": {
      "type": "number",
      "description": "Cashback percent",
      "examples": [
        15
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}