The invention provides an electronic payment method, a bus electronic payment system, and a metro electronic payment system, which relate to the field of public transport. When taking a bus, a user triggers a taking request, and a server returns a two-dimensional code or a bar code to the user. The user scans the two-dimensional code or the bar code on a bus terminal so as to complete scanning electronic payment. When taking a metro, the user scans the two-dimensional code or the bar code acquired through the taking request on a first metro terminal when entering a metro station, and the server records a first position; the user scans on a second metro terminal when exiting the metro station, and the server records a second position. The server calculates metro fee according to the first position and the second position so as to complete electronic payment. According to the electronic payment method, the bus electronic payment system, and the metro electronic payment system, the taking payment is completed through a way that a user terminal acquires the two-dimensional code or the bar code, so that simplicity, quickness and convenience are realized.