Yes, you can purchase game time online without any trouble.
The simplest route is to visit the official store for the game you are playing and buy a subscription or time card directly from there. It is quick, secure, and saves you a trip to a shop.