diff --git a/docs/specification/common/extensions/loyalty.md b/docs/specification/common/extensions/loyalty.md index 5f19da69b..8d911d50a 100644 --- a/docs/specification/common/extensions/loyalty.md +++ b/docs/specification/common/extensions/loyalty.md @@ -568,8 +568,8 @@ hold the Retail Club membership and the Retail Card. The platform can then rende {"type": "subtotal", "display_text": "Subtotal", "amount": 1000}, {"type": "items_discount", "display_text": "Club member benefit", "amount": -150}, {"type": "discount", "display_text": "Free shipping for Retail Card holder", "amount": -199}, - {"type": "fulfillment", "display_text": "Shipping", "amount": 0}, - {"type": "total", "display_text": "Estimated Total", "amount": 651} + {"type": "fulfillment", "display_text": "Shipping", "amount": 199}, + {"type": "total", "display_text": "Estimated Total", "amount": 850} ] } ``` diff --git a/docs/specification/shopping/extensions/discount.md b/docs/specification/shopping/extensions/discount.md index 4b538d503..a9b3980d1 100644 --- a/docs/specification/shopping/extensions/discount.md +++ b/docs/specification/shopping/extensions/discount.md @@ -122,7 +122,9 @@ JSONPath to identify targets: This enables platforms to explain exactly how much each discount contributed to each line item, even when multiple discounts stack. -**Invariant:** Sum of `allocations[].amount` equals `applied_discount.amount`. +**Invariant:** When `allocations` is present, the sum of `allocations[].amount` +equals `applied_discount.amount`. `allocations` is optional; a discount that +omits it is reported in `totals[]` as a single `discount` entry. ## Operations @@ -499,9 +501,9 @@ to line items, and an automatic shipping discount at the order level. "totals": [ {"type": "subtotal", "display_text": "Subtotal", "amount": 4000}, {"type": "items_discount", "display_text": "Item Discounts", "amount": -800}, - {"type": "discount", "display_text": "Order Discounts", "amount": -599}, - {"type": "fulfillment", "display_text": "Shipping", "amount": 0}, - {"type": "total", "display_text": "Total", "amount": 2601} + {"type": "discount", "display_text": "Free shipping on orders over $30", "amount": -599}, + {"type": "fulfillment", "display_text": "Shipping", "amount": 599}, + {"type": "total", "display_text": "Total", "amount": 3200} ] } ```