An affiliate's referral link is different from an affiliate's referral code. A referral link directs the customer to the merchant's store and the customer's visit is then tracked.
In the case of a referral code, it is the unique code present at the end of an affiliate's referral link. It has to be copy-pasted into the referral code input field at the shopping cart page on the store.
For Example:
Here we look at the referral link of an affiliate.
Affiliate Profile
In the Referral Link, the referral code can be found at the end (after the "=" symbol).
Here the referral link is: https://goaffpro.myshopify.com/?ref=R8mfScYiL