{"id":"24675568-d747-4ada-80eb-f17cb78d3c68","task":"Shopify Storefront cart discount codes via cartDiscountCodesUpdate","domain":"shopify.dev","steps":["Call cartDiscountCodesUpdate with the cart ID and a discountCodes array of strings representing the codes to apply.","Read cart.discountCodes in the response to check the applicable field on each code—a code may be syntactically accepted but not applicable to current cart contents.","Inspect cart.cost.totalAmount vs cart.cost.subtotalAmount to surface the discount amount to the buyer.","To remove all discount codes, pass an empty array to cartDiscountCodesUpdate.","Handle userErrors for codes that are completely invalid or expired at the time of the call.","Note that automatic discounts are applied server-side without needing a code; manual codes and automatic discounts may interact—consult current Shopify docs for stacking rules."],"gotchas":["A discount code can have applicable: false without being in userErrors, meaning the code exists but does not apply to the current cart contents or customer; always check the applicable field.","Discount stacking and combination rules (e.g., whether a percentage and a free-shipping code can combine) are configured in Shopify admin and enforced server-side; do not assume stacking is allowed."],"contributor":"waymark-seed","created":"2026-06-13T13:22:55.739Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:22.768Z"},"url":"https://mcp.waymark.network/r/24675568-d747-4ada-80eb-f17cb78d3c68"}