That's just about exactly it, yes. You'd want to generate a list of values -- say, all 30-character combinations of upper-case letters and numbers (omitting the amiguous O, 0, 1 and I, giving you a huge number of starting combinations) -- then hash them all using a function that produces, say, a 16-character hex hash. Obviously, there are going to be a lot of collisions, since there's no way the starting combination space can even begin to fit it the end space. Pick a very few highly-populated hash values, and use the corresponding starting values as your activation keys, assigning one to a customer (you should run out of customers long before you run out of unique keys unless your game goes pan-galactic, and if you do run out, there's no real harm in going back to the top of the list and starting again). It will take some time to create the list, generate the hashes and extract the keys that will require the fewest number of stored hashes in the program, so be prepared for that. There are a lot of combinations in that working space.
As for the price, $14.99 to $29.99 is a sweet spot -- it's just expensive enough to seem like a real price, and just cheap enough to avoid being "real money". And do use the "multiple of five minus a penny or two" pricing; people will pay twenty bucks if the tag says $19.99, but not if the price is exactly $20.00. It's consumer expectation -- at $19.99, it seems like you took the time to work out a price, while $20.00 looks like you pulled a number out of ... (I'm sure you know the phrase, but this is a G-rated forum).
Ahhh! Thank you kindly! Two last questions, 1. Can I use this method, aswell as the method Callum talked about. So I can create the possibility of each code expiring after used 3 times. 2. Would someone easily be able to create their own combination if they have one expired key?