# Get Affiliate Payouts Ready

> Lines up every unpaid commission, catches referrals from refunded orders and checks payment emails before payday.

- 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-payout-prep/

## The prompt

```text
Show me all unpaid referrals, grouped by affiliate, with the total owed to each. For every referral with an order reference, look up the WooCommerce order and flag any that are refunded, cancelled or failed. Also flag affiliates with no payment email. Show me the list and wait for my OK. Then reject the referrals from refunded or cancelled orders and give me a final table of who is owed what. I will pay them from the Payouts screen.
```

## What happens when you paste it

You: Show me all unpaid referrals, grouped by affiliate, with the total owed to each…

Assistant: $6,240 unpaid across 38 affiliates. 7 referrals come from refunded orders, $312 in total. 2 affiliates have no payment email. Calling: `affiliatewp/list-referrals`, `woocommerce/orders-query`, `affiliatewp/list-affiliates`, `affiliatewp/set-referral-status`.

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

Assistant: Rejected the 7 refunded referrals. $5,928 is owed across 38 affiliates. The table is below, with the 2 missing payment emails marked.

## 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.
- **Find orders** (`woocommerce/orders-query`, read only, from WooCommerce): Finds orders by status, customer, email or date, with the items in each order.
- **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.
- **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.

## Variations

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

- Only include affiliates who are owed more than [amount].
- Also show what each affiliate was paid in their last payout.

## 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/
