Discounts applied via email link only

Topic summary

A user seeks to automatically apply a free shipping discount exclusively when customers access their store through an email link.

Challenge identified:

  • Standard verification methods (HTTP Referer headers, cart attributes) are easily manipulated client-side
  • Lack of reliable server-side validation makes this approach problematic
  • This security gap likely explains the absence of existing solutions

Suggested alternatives:

  • Create automatic discounts limited to specific customer segments using tags or metafields
  • Generate unique discount codes per customer and send /discount/CODE links via email for automatic application

Status: The discussion remains open with no definitive solution for link-based verification, but viable workarounds have been proposed.

Summarized with AI on October 28. AI used: claude-sonnet-4-5-20250929.

Trying to get a free shipping discount auto applied to the cart ONLY for customers to access the store via a link provided in an email sent to them. How do I do this? Looked at tons of apps and info online. Can’t find anything.

Hi SmashGrrrl,

How do you plan to verify that a customer visited your store through a specific link? Each approach I’m aware of has flaws:

  • Reading the HTTP “Referer” header: Any client can easily set the header value to whatever they want.
  • Storing the session’s first URL in a cart attribute: Clients can easily set the cart attribute themselves manually without clicking the link.

This lack of server-side validation might be why there’s nobody sharing info online on how to do this.

Have you considered creating an automatic discount limited to the specific customers you send the email to? For example, you could give them all a specific tag or metafield. OR, you can generate unique discount codes for each customer in question, and send them a /discount/CODE link in the email, which will automatically apply said discount.

Hope this helps,

Tobe