With the development of the internet, online-to-offline (O2O) commerce has become a key market. Although studies have investigated factors that affect the usage of online and offline channels, no study has investigated the effect of switching costs on consumer behavior in the context of online travel agencies (OTAs). In addition, online and offline channels have rarely been compared among countries. This study investigated how the costs and benefits of OTAs affect consumer behavior in the context of online and offline channels in China and Indonesia. Consumers' intentions to book were positively affected by expected benefits, the antecedents of which are the perceived reputation and perceived size of OTAs, and by switching costs, which can be increased through increasing asset specificity and uncertainty. Consumers' intentions to book increased their intentions to visit in the hotels they booked. This study provides insight into the development of O2O commerce and guidance for cooperation between OTAs and hotels.