A scammer offers you a membership code in return for an item, such as a Black Long for a month of membership. The scammer gives you a code that actually works. Once you redeem this code, the scammer contacts AJHQ claiming they can't access their account. AJHQ will ask for confirmation such as a membership code. The scammer gives AJ the code, and they receive your account information in return. The scammer is then be able to log into your account and trade all of the items to their account.
You give a scammer your rare item in exchange for a membership code, but they never give the code to you. They may give you a code, but that code could be used or fake.
How to avoid this scam
Method 1: Don't enter the membership code on your main account. Instead, create a whole new account to use the code on, and don't put your rares on it. You can enjoy your member benefits while they last, because it's possible that the person who gave you the membership will take it away.
Method 2: The only way to avoid this scam is to not trade your rares for membership codes, or to make sure the other user gives you the code first. Test out the code before paying the user.
Warning: Exchanging rares is not a recommended way to get a membership, since the chance of getting scammed is high, and it's against the AJ rules. You could get banned from doing this.