"Fair exchange" and "customer anonymity" are important characteristics of e-commerce protocols. The former ensures that both the customer and the merchant can obtain the item of transaction while the latter ensures that the real identity of the customer is not leaked during the transaction process, and that it is also essential to protect personal privacy. Based on past researches, this study introduces a Bitcoin payment mechanism, to it can purchase digital content through online transactions. to proposea mechanism that includes four stages: authorization, browsing, transaction, and mediation. After analysis, it can ensure fair exchange and customer anonymity. Compared with related research, the proposed mechanism has lower computational cost at all stages. In addition, the confidentiality, integrity, identification and non-repudiation of information security requirements can be achieved.