How to handle affiliate payments that include refunds, returns or cancellations
To make sure that refunds are included in the shown amount of Unpaid earnings you need to leave the date fields from: empty. If you restrict the date on the tab Affiliates and the refund happened before this date range the refund won't be deducted from the unpaid earnings.
Here is how the filter should be set when doing the affiliate payments:
When everything is paid out and there have been no returns or changes, you will see a zero for the Unpaid earnings. However, if there have been refunds and no orders were tracked since the last payout, you will get a negative value (i.e. -$10.00).
In case an order is refunded or canceled, the commission is removed automatically from the affiliates' unpaid earnings.
This automatic removal of the commission will only happen if the auto sync option is on.
You can make sure that this setting is on in Settings->General->Auto-Sync store order status
If you already paid the commission for that order, the reduction will be considered on the next payout.