Abstract This study examines the legal implications of online sales agreements based on the Indonesian Civil Code (KUHPerdata) and Law Number 11 of 2008 concerning Electronic Information and Transactions (UU ITE). The research is motivated by the rapid growth of electronic transactions, which has given rise to various legal issues such as fraud, breach of contract, and weak consumer protection due to the limitations of conventional legal frameworks. The study employs a normative legal research method using statutory, conceptual, and analytical approaches, and is analyzed through four main theories: Contract Theory, Legal Certainty Theory, Consumer Protection Theory, and Cyber Law Theory. The findings indicate that an online sales agreement is valid as long as it fulfills the requirements stipulated in Article 1320 of the Civil Code, namely consent, legal capacity, a specific object, and a lawful cause. The UU ITE strengthens this legal foundation by recognizing electronic information and electronic signatures as valid evidence. However, in practice, issues persist, such as difficulties in verifying digital identities, personal data security risks, and the weak liability of e-commerce platforms for consumer losses. Legal consequences of imperfect online sales agreements may include annulment, compensation, and claims for breach of contract. These conditions underscore the need for synchronization between the Civil Code and the UU ITE to ensure balanced legal certainty and protection for sellers, buyers, and platform providers. This study emphasizes that Indonesian civil law must adapt to technological developments to remain relevant in the digital era. Strengthening derivative regulations, enhancing public digital legal literacy, and establishing effective online dispute resolution mechanisms are essential to realizing secure, fair, and trustworthy electronic transactions. Keywords: Online Sales Agreement, Civil Law, UU ITE, Legal Certainty, Consumer Protection.