Building a Shopify Functions discount app (Pricelid)

Shopify’s discount editor will take a percentage or a fixed amount. It will not take “20% off, up to $50.” That is the whole reason Pricelid exists. The discount still lives in Shopify. The app stores the rule as JSON on the discount metafield, and a Shopify Function reads it while the cart is being priced. No theme edits. If the discount is not an order discount, or the metafield is missing, the Function returns no operations and checkout moves on. ...

October 17, 2026 · 2 min · Nicholas Young