A sale and purchase agreement is an important instrument in economic transactions, which is regulated extensively in the Civil Code (Civil Code). With advances in technology, electronic buying and selling transactions via the internet or e-commerce are becoming increasingly relevant. This research aims to understand and examine sales and purchase agreements in e-commerce from the perspective of the Civil Code, including the validity of the agreement, the responsibilities of each party, and the application of tort law. This research methodology is qualitative, with a normative juridical approach to analyzing data from primary, secondary and tertiary legal literature related to conventional and electronic sales and purchase agreements. This research is expected to provide insight into the legal dynamics of sales and purchase agreements in the digital era, as well as strengthen the laws arising from e-commerce transactions. This is important to ensure adequate legal protection for all parties involved in e-commerce transactions, while supporting the growth of the digital economy. By understanding these legal aspects, it is hoped that we can make a theoretical contribution to the development of legal and practical knowledge for legal defenders, business actors and the general public in carrying out electronic buying and selling transactions.