How to charge customers upfront

We have encountered a lot of customers who do not come to book a room, resulting in the loss of listings. Many merchants will let customers prepay by credit card in advance. How do I do that? Our room does not have a front desk. It is self-check-in. Can I get it all online quickly?