# Check for Affiliate Self-Referrals and Fraud

> Looks for affiliates earning on their own orders, refund-heavy referrals and odd traffic before you pay them.

- Job: [Affiliates & loyalty](https://storeagent.ai/mcp-recipes/job/affiliates/)
- What it does: Asks first: changes your store, only after you say yes
- Time saved: ~1 hr vs doing it by hand
- Requires: StoreAgent (free plugin, MCP on every plan) + AffiliateWP
- Works in: Claude, ChatGPT, Cursor and any MCP client connected to the store through StoreAgent MCP
- Web page: https://storeagent.ai/mcp-recipes/affiliate-fraud-check/

## The prompt

```text
Check my affiliate referrals from the last 60 days for signs of fraud. Flag referrals where the customer is the affiliate's own user account, affiliates whose referred orders are often refunded, visits from one referrer that come in large numbers and never convert, and referrals much bigger than that affiliate's usual. Show me each case with the evidence. Do not change anything until I say so. Then reject the referrals I pick and add a note to the affiliate.
```

## What happens when you paste it

You: Check my affiliate referrals from the last 60 days for signs of fraud…

Assistant: 4 referrals were for the affiliate's own account. One affiliate has 6 of 9 referred orders refunded. One referrer sent 2,300 visits with no sales. Calling: `affiliatewp/list-referrals`, `affiliatewp/list-affiliates`, `affiliatewp/list-visits`, `woocommerce/orders-query`, `affiliatewp/set-referral-status`, `affiliatewp/update-affiliate`.

Assistant: This will make changes in WooCommerce. Do you want me to go ahead?

Assistant: Rejected the 4 self-referrals and the 6 refunded ones, $418 in total. Added a note to the 2 affiliates involved. Nothing else changed.

## Abilities this recipe calls

- **List referrals** (`affiliatewp/list-referrals`, read only, from AffiliateWP): Lists commissions with amount, status, affiliate, customer and campaign. Filters by affiliate, status or date.
- **List affiliates** (`affiliatewp/list-affiliates`, read only, from AffiliateWP): Lists affiliates with status, rate, group, earnings and referral counts. Filters by status, name, email or date.
- **List visits** (`affiliatewp/list-visits`, read only, from AffiliateWP): Lists affiliate link visits with landing URL, referrer, campaign and whether they converted. No IP addresses.
- **Find orders** (`woocommerce/orders-query`, read only, from WooCommerce): Finds orders by status, customer, email or date, with the items in each order.
- **Change a referral's status** (`affiliatewp/set-referral-status`, asks first, from AffiliateWP): Marks a referral paid, unpaid, pending or rejected. Marking paid sends no money.
- **Edit an affiliate** (`affiliatewp/update-affiliate`, asks first, from AffiliateWP): Edits an affiliate's name, rate, rate type, payment email, admin notes or group.

## Variations

Add one of these to the end of the prompt. Swap anything in [brackets] for your own details.

- Also pause any affiliate with more than [number] flagged referrals.
- Only check affiliates who are owed more than [amount].

## Related recipes

- [Loyalty Program Health Check](https://storeagent.ai/mcp-recipes/loyalty-health-check.md): Tells you if your points program is working: how many points are redeemed, what it costs you and where points come from. Needs Advanced Loyalty Program.
- [Save Loyalty Points Before They Expire](https://storeagent.ai/mcp-recipes/save-expiring-points.md): Finds customers about to lose their points and gives them a small bonus that keeps their account active. Needs Advanced Loyalty Program.
- [Reward Your Top Loyalty Members](https://storeagent.ai/mcp-recipes/reward-top-loyalty-members.md): Ranks your most loyal customers by points earned and gives them a bonus as a thank you. Needs Advanced Loyalty Program.

---

Part of the StoreAgent WooCommerce MCP Recipes directory: https://storeagent.ai/mcp-recipes/ (index for LLMs: https://storeagent.ai/mcp-recipes/llms.txt). Get StoreAgent free: https://app.storeagent.ai/sign-up/
