Third-party cookies are going away
Affiliate programs have long relied on third-party cookies to remember which link a shopper clicked. Browsers now block or limit those cookies, which makes cookie-based affiliate tracking increasingly unreliable, especially across the days between a click and a purchase.
Use Shopify's server-side webhooks
Shopify emits order and checkout webhooks from its own servers when a sale completes. Those events are authoritative and do not depend on anything in the shopper's browser. Keying attribution to the affiliate's tracking link and confirming the sale from these webhooks gives you attribution that survives cookie loss.
From there, the commission is applied to the real order value, excluding refunds and taxes as configured, and reversed if the order is later refunded.