Business logic helpers for UCP discount capability.
Discounts enable businesses to apply promotional codes and automatic discounts to checkout sessions.
Key Invariants
- Sum of allocation amounts equals the discount amount
- Rejected codes appear in
codesbut not inapplied - Rejected codes communicated via messages with type "warning"
Summary
Functions
Returns the supported allocation methods.
Returns the supported rejection codes for discount validation.
Returns discount-related total types.