Yes, you can book and pay for a hotel for someone else. It's actually quite common to do so! You just need to make sure that the person who will be staying at the hotel has all of their information ready when booking, such as name, address and payment details.