Under the “smart” development trend of urban rail transit, the traditional structure of automatic fare collection (AFC) system must be adjusted in combination with traditional services and new payment methods in order to meet the requirements of the application of new payment methods and networked operations. An urban rail transit AFC system based on a cloud platform and microservice architecture was developed. It has the advantages of distributed storage, high availability, intelligent operation and maintenance, and low coupling, which can compensate for the defects of the traditional AFC architecture and single architecture. Based on the analysis of the current situation of the AFC system, advantages, and disadvantages of the monolithic architecture and microservice architecture, this study considers the adoption of the AFC system based on the cloud platform and the microservice architecture and uses the microservice architecture to build the cloud platform. It also presents the business in the form of microservices and considers the governance methods under the microservice architecture. Subsequently, the compatibility of the new architecture with the existing system is discussed. Finally, the problems caused by the introduction of the microservice architecture in the AFC system are examined, which provides reference for the development of the AFC system in the smart urban rail situation.