You can check your PSN code is valid by redeeming it. If the code is valid you will receive a confirmation step and if it isn't it will be rejected with an error message.