Tiered discounts
Methods for reading tiered discount incentives for the currently logged-in customer.
These calls hit the Storefront API GET /incentives/tiered_discounts endpoints. The SDK requires a session that includes customerId; otherwise the methods throw with the message Not logged in.
Tiered discount configurations also appear on bundle payloads returned by loadBundleData under incentives. Each tier (Tier) encodes the discount and exactly one eligibility rule: either a minimum quantity (condition_quantity_gte) or a minimum line price (condition_line_price_gte), not both.
listTieredDiscounts v1.81.0 read incentives Types
List tiered discounts with optional filters and cursor pagination.
- ESM
- UMD
import { listTieredDiscounts } from '@rechargeapps/storefront-client';
const result = await listTieredDiscounts(session, {
status: 'published',
limit: 25,
});
const result = await recharge.tieredDiscount.listTieredDiscounts(session, {
status: 'published',
limit: 25,
});
Optional query arguments are documented on TieredDiscountsParams.
getTieredDiscount v1.81.0 read incentives Types
Fetch a single tiered discount by numeric or string id.
- ESM
- UMD
import { getTieredDiscount } from '@rechargeapps/storefront-client';
const discount = await getTieredDiscount(session, 123);
const discount = await recharge.tieredDiscount.getTieredDiscount(session, 123);
id must be non-empty; a blank id throws with the message ID is required.