if you feel pain you should stop IMMIEDIATLY. Pain usually means you dont have good technique. (your doing something improper repeaditly... by letting your wrists go lower usually... doing this leads to carpotunul and tendinidous, ask you piano teacher to help you if you have one or , what i do, play the hanon excersises but put a loonie or dime or whatever on the top of you hands. play the hanon excersises until they fall off. once they fall off try again until you can play the whole excersise without them falling off... after that you can take it off... this will help tremediously with you teqnique)
hope this helped
Jen