On this page
Shared coupon mailers or your own coupon postcard
| Shared coupon mailer | Your own coupon postcard | |
|---|---|---|
| Who gets it | Every home in a zone | The households you choose |
| Next to it | Other businesses’ coupons | Nothing else |
| The code | Usually one for everyone | One per household |
| What you learn | How many came back | Which households came back |
Your own card can go to your customers, the streets around a new location, or anyone on a list you build, as in targeted direct mail. To reach every home on a few routes instead, compare it with Every Door Direct Mail.
What a coupon postcard says
- The offer, big: 15% off, a free side, $20 off a first service.
- An end date, which gives people a reason to use it soon.
- The terms: what it’s good for, one per household, not with other offers.
- The code, typed in or scanned, and where to use it: in store, online, or both.
- The name on the front, if you have it, up to 14 characters.
Coupons are advertising, so they fit USPS Marketing Mail, and USPS’s rulings treat a code like this, which only identifies the household to you, as a keycode rather than personal information. Layout rules for each side are in direct mail design.
One code per household, made before the API send
| household | code |
|---|---|
| h_1042 | K7QM-2XPA |
| h_1043 | R4TN-8WEC |
| h_1044 | B9HX-3LUD |
- Make the codes first. Random, not sequential, so nobody can guess the next one, and without characters people misread, like 0 and O. A
promo_codecan be up to 12 characters. - Load them as one-use codes in your checkout or POS before the cards go out.
- Keep which household got which, so a redemption points back to the household and the drop.
- For a register that scans, print each household’s code as a barcode or QR code: one image per household at a public https link, sent in merge.
Code: an automated coupon drop with a code per household
This makes a one-use code for every household (and reuses them on a re-run), saves them for your checkout, and mails a 6x9 coupon card to each household with its own code and barcode:
# Once per coupon drop. Env: MAILR_API_KEY.
# households.csv: id, name, first_name, line1, line2, city, state, zip
# mail/coupon/front.html and back.html: your design, with {{first_name}}, {{promo_code}} and, for a scannable
# code, <img src="{{barcode_image}}"> where each household's barcode image lives at a public https link.
import csv, os, requests, secrets
DROP = "feb-2027"
ALPHABET = "ABCDEFGHJKMNPQRSTUVWXYZ23456789" # no 0/O or 1/I/L to misread
code = lambda: "".join(secrets.choice(ALPHABET) for _ in range(4)) + "-" + "".join(secrets.choice(ALPHABET) for _ in range(4))
with open("households.csv", newline="") as f:
homes = list(csv.DictReader(f))
# 1. Make one code per household and save them. Load codes.csv into your checkout or POS as one-use codes
# before the cards go out. Re-running reuses the saved codes instead of making new ones.
codes = {}
if os.path.exists(f"codes-{DROP}.csv"):
with open(f"codes-{DROP}.csv", newline="") as f:
codes = {row[0]: row[1] for row in csv.reader(f)}
for h in homes:
codes.setdefault(h["id"], code())
with open(f"codes-{DROP}.csv", "w", newline="") as f:
csv.writer(f).writerows(codes.items())
# 2. Mail each household its own code, 1,000 per request.
front, back = open("mail/coupon/front.html").read(), open("mail/coupon/back.html").read()
for n, start in enumerate(range(0, len(homes), 1000)):
chunk = homes[start:start + 1000]
r = requests.post("https://api.mailr.dev/v1/batches", timeout=120,
headers={"Authorization": f"Bearer {os.environ['MAILR_API_KEY']}", "Idempotency-Key": f"coupon-{DROP}-{n}"},
json={"kind": "postcard", "size": "6x9", "verify": True, "front": front, "back": back,
"merge": {"ends": "February 28"}, # the same on every card
"recipients": [{"to": {"name": h["name"][:40] or "Current Resident", "line1": h["line1"],
"line2": h["line2"] or None, "city": h["city"], "state": h["state"], "zip": h["zip"]},
"merge": {"first_name": (h["first_name"] or "Neighbor")[:14],
"promo_code": codes[h["id"]],
"barcode_image": f"https://acme.example/barcodes/{codes[h['id']]}.png"}}
for h in chunk],
"description": f"Coupon drop {DROP}"})
if r.status_code == 422: # the error names the row to fix; nothing in this batch was sent
print("batch", n, r.json()["error"]["message"])
continue
r.raise_for_status()
print(r.json()["id"], r.json()["count"], r.json()["price"])mlr_test_ key first, and scan a barcode or two on the proofs: nothing prints or charges.Counting coupon mailer redemptions
Every code that comes back at checkout is one household from one drop. Divide the codes used by the cards mailed for a redemption rate, and leave a random slice of the list without a card to see how many would have come in anyway, as in direct mail campaign. A win-back campaign uses the same code for customers who went quiet.
What coupon mailers cost by API
| Households | 4x6 | 6x9 |
|---|---|---|
| 500 | $425.00 | $445.00 |
| 1,000 | $850.00 | $890.00 |
| 2,500 | $2,125.00 | $2,225.00 |
| 5,000 | $4,250.00 | $4,450.00 |
Pay as you go prices, with printing in full color on both sides, addressing and postage. Checking the addresses is extra. The discount itself is yours to give.
Coupon mailer questions
How much do coupon mailers cost?
On your own postcard through Mailr, $0.85 for a 4x6 and $0.89 for a 6x9 on pay as you go, with printing and postage. 1,000 households at 6x9 is $890.00.
Can every coupon have its own barcode?
Yes. Make one barcode image per household, put the images at public https links, and send each link in merge; the design shows it with <img src="{{barcode_image}}">.
Can people share the code online?
Only once, if it's a one-use code in your checkout or POS. That's the main reason to give each household its own.
How long should a mailed coupon last?
Long enough to arrive and be used: USPS Marketing Mail takes 3 to 10 business days, so give it a clear end date several weeks after the drop.
Do coupon mailers work?
Count it yourself: with a code per household and a slice of the list left unmailed, you'll see how many came in because of the card.