Referral order both uses affiliate link and coupon code?

Affiliate link and coupon has the same function, which means a referral order can be tracked whether it is made via the affiliate link or the coupon.

In case affiliate link and coupon belong to 1 affiliate (customer visit merchant's shop on the affiliate link and use coupon code of the same affiliate), that affiliate will not get double commission, they will just get commission calculated basing on order amount after applying coupon code.

In case affiliate link and coupon come from 2 affililates (customer visit website on affiliate link from affiliate A and use coupon from affiliate B), the affiliate with coupon (affiliate B) will get commission.

To sum up, affiliate link and coupon can both be used to track referral order, but in case both are used, coupon will be prioritized.