This paper uses formal methods to improve the security of the e-commerce system specifications and reduce the number of security threats to the minimum. The result shows the effectiveness of using formal methods for empowering e-commerce security. Z specification language is used to design the e-commerce system & specify security constraints. Besides, Z/EVES formal methods tool is considered for demonstrating our work.