If your product key is valid and rejected by Windows 8.1 despite being valid for that version of Windows you may input the product key via the command prompt. To do this right click the Start button or press [Windows] and [x]. Select Command Prompt (Admin)
To input your product key type
slmgr /ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
Where xxxxx-xxxxx-xxxxx-xxxxx-xxxxx is your product key and then press Enter.
Select ok and then to activate type
slmgr /ato
This will activate your product.
Select ok and then close the command prompt.
If the product key is successfully input but product activation is rejected as in this case you need to use Phone Activation. This will happen for all systems that are offline.