Hey Guys, I have not fully feature locked this, but working on this today I was more inclined for adding a get parameter to the url and saving the referral in a cookie. My reasons for doing something are almost always ease of use. I will not make something which users find complicated.
So with that in mind, the first question I had was how is someone going to refer someone else? Uber is a worldwide success story and I saw how they are doing it. They simply append the referrers code to the url which the referrer can share. So I like that... it's simple. So, in xenforo I am going to put a link somewhere very conspicuous where members can click which opens a popup. The popup for now only has a link which gets auto highlighted on click and members can copy that link and share wherever they want. That link is going to have their affiliate code as a GET parameter.
When someone is going to visit the sales page with that get parameter set, it's gonna save the cookie, which will credit the referring member. If they directly buy from the purchase link (which may or may not be present in the popup earlier, still not decided on that one), that's also gonna credit the referring member.
I may or may not tie the points earned to a popular credits addon here... We personally don't use a credits addon yet so still undecided on that one...
Anyways, the above is what I am considering at the moment, you guys will see an update very soon...