There have been increasing reports of iTunes giving users error "5002" when trying to purchase content from the iTunes store.
Apple Discussions poster: shuanglong
"I just upgraded my iTunes to v8.0 and now when I try to upgrade the applications in my apps folder for my iPhone I get the message that an unknown error 5002 occurred."
This error has to do with the iTunes service, since it occurs for users on various versions of OS X, and seems to affect Windows users as well. This error seems to be due to problems with the user's shopping cart, and in many cases can be fixed by changing the method of purchasing content as well as clearing the shopping cart.
Change the shopping preferences to 1-click In order to bypass the shopping cart, users can set their purchases to immediately download by enabling 1-click shopping. This is available in the iTunes preferences under the "Store" section.
Clear contents of shopping cart This problem may also be caused by problems with the items that are currently stored in the users's shopping cart, and several people have reported clearing this problem by removing all items from the shopping cart. It is then recommended to sign out of the store and sign in again in order to refresh the shopping cart.Resources