# Discount codes that can't be shared

You text a discount to the shoppers who actually opted in, and a few hours later that same code is sitting on a coupon-aggregator site or copied into a group chat. One shared code is easy to send, but once it's out in the world, anyone can use it. The people you meant to reward end up sharing the reward with strangers.

The new **Unique code per customer** toggle changes that. Turn it on for a discount in your flows, and instead of handing everyone the same code, OneText clones your discount into a fresh, single-use code for each shopper. Every person gets their own code, it works exactly once, and the original code you set up never leaves your store.

![The Unique code per customer toggle in a purchase step's discount settings, inside the flow editor](https://cdn.hashnode.com/res/hashnode/image/upload/v1783670915966/02e6081a-4012-45b7-85e4-d13eab8dbe32.png)

## How it works

Set up a code discount the way you always would, then open **Advanced discount options** and switch on **Unique code per customer**. From then on, whenever a shopper reaches that step, OneText creates a brand-new code just for them, cloned from your template, and shows them that code instead of the shared one. Because each code is single-use, there's nothing to gain from passing it along. It's already spent the moment that customer redeems it.

![Turn on Unique code per customer under any code discount, and set how long each cloned code stays valid](https://cdn.hashnode.com/res/hashnode/image/upload/v1783670916298/548d92de-a444-4748-964b-0369c08c13e8.png)

You can still set an expiry, so each unique code winds down on the same schedule as the offer. The shopper sees a real, working code in their text, and the master code behind it stays private.

## Why it matters

A discount is only as valuable as your control over who uses it. With one shared code, a single screenshot can turn a targeted offer into a public giveaway. With a unique code per customer, the offer stays with the people you actually sent it to. You get the reach of a texted discount without the leakage.

You'll find it in the flow editor, under the discount settings for your purchase, offer, and message steps, for Shopify stores with discounts connected. Open a flow, add a code discount, and turn on **Unique code per customer**. Already sending [rich product cards from the same flow editor](https://onetext.hashnode.dev/2026-07-04-rcs-flow-editor)? This slots right in beside them.
