Coupons that don't leak margin

Minimum order values, first-order-only rules and usage caps are all priced on the server now — so a code can't be stacked or replayed. Here's how to structure a launch offer that survives contact with the internet.

7 August 20266 min readDukaan team

A discount code is a small contract you publish to the entire internet. Most sellers write it as though only their intended customer will ever see it, and then discover it on a coupon-scraping site being applied to ₹200 orders by people who were never going to pay full price.

The good news is that on Dukaan the enforcement is not negotiable — coupons are validated and priced on the server, by the same code that charges the payment. A code cannot be edited in the browser, stacked with itself, or replayed after it has hit its limit. What is left to you is the design of the offer, which is where the actual margin decisions live.

Always set a minimum order value

The single most important field, and the one most often left blank.

A flat "₹100 off" with no minimum is an invitation to buy your cheapest single item at a loss. Set the minimum somewhere above your average order value — not below it. If your AOV is ₹850, a minimum of ₹999 turns the coupon from a discount into an upsell: people add something to qualify.

That is the whole trick. A well-set minimum makes a coupon raise your average order value while feeling like a gift.

Percentage or flat? It depends which way you want to be wrong

Flat amounts (₹150 off) are predictable — you always know the worst case. They hurt disproportionately on small orders and feel insignificant on large ones.

Percentages (15% off) scale with the order, which feels fairer to the customer and reads better in marketing. But an unexpectedly large order gives away an unexpectedly large amount.

The usual right answer for a small store: a percentage with a cap — "15% off, up to ₹300" — combined with a minimum order value. You get the marketing appeal of a percentage and the predictable worst case of a flat amount.

Usage caps are for when it escapes

Assume every code you create will eventually be posted somewhere public. Then decide what happens next.

Total usage cap. The blast radius. A launch code capped at 100 total uses cannot cost you more than 100 × your maximum discount, whatever happens on Twitter.

Per-customer cap. Stops one person ordering eleven times with the same code. Usually set to one.

Expiry date. Every code should have one, including your evergreen ones. A code with no expiry is a code you will still be honouring in 2029 without remembering why it exists.

First-order-only. The right setting for an acquisition offer — and the wrong one for a loyalty reward. Getting this backwards is common: sellers discount their existing, loyal customers who would have paid full price, and offer nothing to the strangers they were trying to acquire.

Structuring a launch offer that works

A concrete shape you can copy, for a store with an ₹850 average order value:

Code: a word, not a random string — people mistype random strings and then email you about it.
Discount: 15%, capped at ₹300.
Minimum order value: ₹999.
First order only: yes.
Total uses: 200.
Per customer: 1.
Expires: three weeks out.

Worst case that costs you ₹60,000 in discount and brings 200 new customers who each spent at least ₹999 — and you know that number before you publish, not after.

What the server-side pricing engine protects you from

Worth knowing what you no longer have to worry about, because on many platforms these are real risks.

The total is computed once, on the server, by the same engine that charges the payment — the browser never does the arithmetic. So an expired code cannot be honoured by an old cached page. A code over its usage limit is refused with the reason shown to the buyer. Two codes cannot be quietly combined. A captured checkout request cannot be replayed for a second discount.

And when a coupon runs alongside loyalty points and a membership discount, they compose in a fixed order with a defined floor, so two promotions running at once cannot accidentally sell below your cost. That last one catches more stores than deliberate fraud ever does.

The discipline nobody enjoys

Set an end date on every campaign and actually let it end. The most expensive coupon in most stores is not the one that leaked — it is the launch code from eighteen months ago that still works, quietly discounting a slice of every month's orders, because nobody remembered to switch it off.

Free forever plan

Your store, live in 30 seconds.

No card. No code. Nothing to cancel.

Start free