Most commonly, passengers use a transport card, such as the T-mobilitat in Barcelona, which can be loaded with different types of tickets or travel passes. You can also purchase a single ticket directly from the driver using cash or, in many cities, by using a contactless payment method like a credit card.