Rule coupon_hijack, read from the engine code

Coupon code hijacking, held before payout

Coupon code hijacking is a coupon taking credit for customers another affiliate already brought in. A deal site or browser extension often leaks the code. At 3 such sales in 7 days, the engine holds the sale and pauses the coupon's owner.

By the AffiliateTracking teamUpdated 5 min read

Fraud page on demo data: held commissions, each with the rule that held it and Release and Uphold buttons, above the verdicts that explain each hold.

The fraud queue in the product, running on demo data.

The short answer

The rule counts sales credited by one coupon in the last 7 days whose customer was already bound to a different affiliate. At 3, it holds the sale and pauses the coupon's owner. It is the only rule that pauses an account.

How the rule works

Read from internal/fraud/engine.go. The code fixes the thresholds. No setting changes them.

  1. 01Customers bind to one affiliate

    The first affiliate to bring a customer keeps them for life in that program. The binding is the baseline the rule checks against.

  2. 02Three overrides in 7 days

    The engine counts this coupon's sales from the last 7 days where the customer is bound to someone else. Three or more fires the rule.

  3. 03Hold plus a pause

    The engine holds the sale and pauses the coupon's owner. A paused partner can't sign in, earns no new credit and gets no payout until you resume them.

The exact logic

// internal/fraud/engine.go, CouponHijackPattern (condensed)
SELECT COUNT(*) FROM commissions c
  JOIN customers cu ON cu.program_id = <this program>
                   AND cu.external_customer_id = c.customer_ext_id
 WHERE c.attribution_method = 'coupon' AND c.coupon_code = <code>
   AND c.created_at > now - 7 days
   AND cu.affiliate_id != c.affiliate_id
if count >= 3 { hold(commission); pause(coupon owner) }

Condensed from the Go source in v0.5.0 (main 4f87f77). Comments are ours.

The signals

  • 3 or more bound customers taken by one coupon
  • 7-day window, per program
  • Pauses the coupon's owner
Hold scope. It holds the commission being screened and pauses the coupon's owner. This is the only rule that pauses an account.

Our data

We ran the rule at its threshold

We ran 2 fixtures through the real engine on 3 Oct 2026: 1 below the line, 1 at or past it. These are the results and the engine's own words.

coupon_hijack · 2 fixtures · fresh SQLite each
Each fixture run through the real engine, and whether coupon hijack fired
FixtureResultThe engine's reason
2 bound customers taken by coupon SPRING40 in 7 daysSilentNo verdict
3 bound customers taken by coupon SPRING40 in 7 daysFiredCoupon "SPRING40" took 3 existing customers from other partners in the last 7 days
In the firing fixture the coupon's owner went to paused, and the affiliate the customers belonged to stayed active.
Coupon hijack: where the rule fires Threshold chart: bound customers one coupon took in 7 days. The engine stayed silent at 2 and fired at 3. The line sits at 3. Bound customers one coupon took in 7 days Fires at 3 Green: 2, silent Red: 3, fires 06
Where coupon hijack fires, from the fixtures above. Engine v0.5.0 (main 4f87f77), run 3 Oct 2026.

Method: one Go test against engine v0.5.0 (main 4f87f77), a new SQLite database per fixture, dry run so nothing was held. Re-run with go test ./internal/fraud/ plus the fixture list above.

What lands in your queue

When coupon hijack fires, the verdict shows the rule, who it's about and what it saw. Release or uphold is your call, not the engine's.

Fraud queue · coupon_hijack · demo dataMade-up numbers, real wording
Example held commission after coupon hijack fired, on demo data, with the engine's reason text
PartnerWhat it sawCommissionResult
Affiliate 42Coupon "SPRING40" took 3 existing customers from other partners in the last 7 days$358.00Commission held Partner paused
heldWaits for youThe commission stays out of payouts until you decide.
releasedPaid normallyIt goes into the next payout.
upheldNot paidThe engine cancels it and takes the money back. Already paid? Use a refund.

In the wild

Honey made coupon credit a court case.

  • Case: In re PayPal Honey Browser Extension Litigation, N.D. Cal. 5:24-cv-09470, was filed in Dec 2024. It was dismissed with leave to amend in Nov 2025. In Jun 2026 the court denied PayPal's motion to dismiss the amended complaint. Source: Cohen Milstein case page.
  • Network: Rakuten Advertising removed Honey from its network on 12 Jan 2026. Source: Hello Partner, 12 Jan 2026.
  • Policy: Google announced on 11 Mar 2025 that Chrome extensions may only take affiliate credit when they give the user a direct benefit. Enforcement began 10 Jun 2025. Source: Chrome Web Store policy update.
  • Scale: PayPal agreed to buy Honey for $4 billion in Nov 2019. Source: TechCrunch, 20 Nov 2019.

Each item re-read against its linked source on . Items we couldn't verify were cut.

Limits, and how attackers try to beat it

  • New customers don't count. A leaked code used only by strangers never fires it, because nobody owned them first.
  • It needs your billing tool to report the coupon and a customer id on each sale.

A leaker can spread the code thin, two stolen customers a week. That keeps the damage small and slow. Codes used where no click or token exists push the sale down to credit by IP address match alone. Rings that pass one code around also share buyers, which overlapping buyer emails counts.

Related rules

Thresholds checked against the code on . Windows roll with each sale.

Coupon hijack questions

How do I undo the pause?

Open the partner and choose Resume partner. What they already earned is kept. Release or uphold the held sales in the fraud queue.

Can I raise the threshold?

Not from settings. The default is 3 in the code. Changing it means changing the engine.

When does the rule run?

On every credited sale, in the same database transaction as the credit. A sweep every 5 minutes also re-checks affiliates active in the last hour.

What does a hold cost me?

Nothing but time. A held commission stays out of payouts. Release it and it pays in the next payout. Uphold it and the engine cancels it and takes the money back.

Can I test it without holding anything?

Yes. Set AE_FRAUD_DRYRUN=1. The engine records each verdict and holds nothing.

Who wrote this

The AffiliateTracking team writes these pages from the engine's own code. Every threshold here is pinned by a test in the repository. Spot a mismatch? Tell us and we'll fix the page or the code.

This rule, on every sale,
before the payout.

Self-host for free, or let us run it for you.