tinyE: But is there a way to discern purchase from redeeming a code?
Yes. They use it to block accounts from sending gifts if the account hasn't purchased $10 of stuff (at least 3 months ago, but the time frame isn't relevant).
Edit for clarity: Last I checked (last Christmas, or maybe the one before), there is an automated system already in place where an account can't buy a game as a gift unless the account has spent at least $10 (don't know if wallet funds, which didn't exist at the time, count) and it has been a few months since the $10 threshold was reached. I believe this was done to help deal with the credit card fraud that was prevalent at the time.
So yes, it is possible to restrict some actions based on actually spending money. How applicable this is to the forum side, I don't know.