@suluk/payments - v0.1.0
    Preparing search index...

    Function computeDiscountAmount

    • The cents a discount removes from subtotalCents — ROUNDED to a whole cent and CLAMPED to [0, subtotal] so a discount can never exceed the order or go negative. Validation (eligibility) is validateDiscount; this is the raw amount assuming the discount applies.

      Parameters

      Returns number