Commerce
Tiered (volume) pricing API
Prices the entire quantity at the single tier rate the quantity falls into (volume model), with the selected tier, flat fee, and effective unit price. Answers 'How much for 60 units under volume pricing?', 'Which tier does my order fall into?'.
Price$0.02per request
MethodPOST
Route/v1/commerce/tiered-pricing
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
commercepricingtieredvolumetierquantity-pricingwholesalebilling
API URL
Integration docshttps://x402.hexl.dev/v1/commerce/tiered-pricingExample request
{
"quantity": 60,
"tiers": [
{
"upTo": 50,
"price": 10
},
{
"upTo": 100,
"price": 8
},
{
"upTo": null,
"price": 6
}
]
}Example response
{
"model": "tiered (volume) — whole quantity at one tier's rate",
"quantity": 60,
"selectedTierIndex": 1,
"selectedTier": {
"upTo": 100,
"unitPrice": 8,
"flatFee": 0
},
"unitPrice": 8,
"flatFee": 0,
"variableCost": 480,
"total": 480,
"effectiveUnitPrice": 8,
"interpretation": "All 60 units priced at the $8 tier rate; effective $8/unit."
}Input schema
{
"type": "object",
"required": [
"quantity",
"tiers"
],
"properties": {
"quantity": {
"type": "number",
"examples": [
60
]
},
"tiers": {
"type": "array",
"examples": [
[
{
"upTo": 50,
"price": 10
},
{
"upTo": 100,
"price": 8
},
{
"upTo": null,
"price": 6
}
]
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}