E-commerce has expanded rapidly, yet its multilayered contractual structures create uncertainty regarding consent, ownership, financing, delivery, and consumer protection under Sharia economic law across increasingly complex and rapidly evolving markets. This study aimed to evaluate the Sharia compliance of e-commerce transactions and identify legal risks within digital commercial ecosystems. A mixed legal-research design combined normative juridical analysis, transaction auditing, platform-document review, consumer-complaint analysis, expert validation, and a structured Sharia Compliance Index. The dataset comprised 240 transactions, 96 platform documents, 72 verified complaints, and assessments from 18 experts. Results showed that 49.17% of transactions were fully compliant, 35.00% were conditionally compliant, and 15.83% were noncompliant. Direct marketplace sales achieved the highest compliance scores, whereas buy-now-pay-later and dropshipping models showed greater exposure to rib?, gharar, unclear ownership, hidden charges, misleading information, and unfair risk allocation. Price transparency, verified ownership or agency, delivery certainty, fair refund rights, and strong platform disclosure significantly increased compliance. The study concludes that e-commerce is permissible when the entire transaction architecture protects valid consent, lawful ownership, transparent pricing, consumer welfare, and equitable risk distribution. Comprehensive Sharia assessment must therefore examine sellers, platforms, financiers, suppliers, logistics providers, and digital interfaces rather than the primary sale alone.