Discount

interface Discount { offer_id?: number; amount: string; description?: string; name?: string; percentage?: string; }

Source: global.ts:1028

A single discount applied to the cart, an item, or shipping — whether from an offer or a voucher. Appears in CartState.offerDiscounts, CartState.voucherDiscounts, and ShippingMethod.discounts.


Properties

offer_id: number

ID of the offer that generated this discount.

amount: string

Discount amount as a formatted string (e.g. "$10.00").

description: string

Optional description of the discount (e.g. "10% off").

name: string

Optional name of the discount (e.g. "Spring Sale").

percentage: string

Optional discount percentage as a numeric string (e.g. "10" or "10.00").