Launch a blockchain-powered ecommerce store with Dshop in AWS Marketplace
One of the emerging themes of the post-Web 2.0 world is decentralization, and more internet users are seeking greater control over their activities and data. Blockchain is a technology that enables the removal of traditional intermediaries from a vast array of applications. Blockchains provide a tamper-proof history of records and transactions in a series of blocks, or a ledger. Each block is cryptographically linked to a previous one, and any change to a block corrupts all subsequent blocks. Originally envisioned for peer-to-peer payments, some blockchains can also support business logic code, or smart contracts. Ethereum, created in 2015, is the largest blockchain that supports smart contracts, and it currently supports billions of dollars in economic activity and value.
Origin Protocol’s Dshop, available in AWS Marketplace, is an open platform for ecommerce that uses the Ethereum blockchain. Origin Protocol is an AWS Partner Network (APN) Technology Partner. Dshop has no setup costs and is 100% open source and customizable. Cryptocurrency payments are irreversible, peer-to-peer, and fast. Dshop supports cryptocurrency payments including OUSD, OGN, ETH, DAI, and all ERC-20 tokens, which reduces chargeback risk, cross-border payment overhead and delays, and processing fees.
In this post, I show how to create ecommerce storefronts that support cryptocurrency payments.
How it works
The entire front-end application logic, product database, and supporting media (such as product images) are hosted on the Dshop backend, which is an Amazon EC2 instance. Customers go through the typical purchase flow and pay via their Ethereum wallet at checkout. The merchant can configure their store to accept ETH, Ethereum’s native cryptocurrency, any Ethereum token that they want, or both. Dshop has integrations with Stripe and PayPal for merchants who want to accept traditional forms of payment. Dshop also supports cash and manual payment methods.
Customer and order details are encrypted with Pretty Good Privacy (PGP). The resulting hash and Ethereum payment transaction hash is sent to the Origin Dshop backend for verification. For a credit card payment, only the order details and transaction information are sent. This data is then downloaded and decrypted, which enables the merchant to send notification emails and fulfill orders.
- An AWS account
Here is a step-by-step guide to launching a Dshop store. For more information, see the full documentation with images and support on GitHub.
Step 1: Deploying Dshop
Here is how to deploy your Dshop storefront. The first step involves subscribing to Dshop in AWS Marketplace and deploying it on an EC2 instance. Follow these steps to start the process of setting up your own Dshop.
Step 1.1 Subscribing to Dshop
- Go to the Origin Protocol Dshop solution in AWS Marketplace.
- Choose Continue to Subscribe.
- Accept the AWS terms of service if necessary. After a few minutes, you see the license effective date instead of Pending.
- Choose Continue to Configuration.
- Choose the version that you want to run and the Region that you want to deploy to. The latest version is generally preferred.
- Choose Continue to Launch.
Step 1.2 Deploying Dshop on the EC2 instance
- For Choose Action, choose Launch from Website.
- Choose your instance type. A minimum of 1 GB of RAM and 10 GB disk is recommended, which is equivalent to at least a t2.micro. Make sure that your security group has ports 80 and 443 open so that you can access the admin.
- Select the VPC and subnet for the deployment of the new instance. The default settings are recommended. To use SSH access with the EC2 instance, choose a security group with port 22 open.
- Choose a key pair from the available list.
- If you do not have a key pair, go to the EC2 console. In the navigation pane, under NETWORK & SECURITY, choose Key Pairs. Choose Create key pair.
- Return to the solution page and choose Launch.
Step 2: Configuring the domain and the Dshop node
Next, you configure the domain settings to work with the Dshop node. This allows visitors to navigate to your storefront. For more information, follow the instructions in Working with records in the Amazon Route 53 Developer Guide.
Step 2.1 Configuring the domain
- Get the IP address assigned to your new instance from the EC2 console.
- In the Route 53 console, select the zone you want to add this record to. The zone is your domain name. Choose Create record. You will create a new A record pointing at this address.
- Choose Simple Routing.
- Define the record, for example
api.mydomain.comThis is the backend administration URL and used as the shop’s backend. It is not the domain that your customers use to view the store.
- Choose Create records.
In a few minutes, you can access the Dshop onboarding page by navigating to
api.mydomain.com (or your chosen record) in your browser.
Step 2.1 Configuring the Dshop node
- In a browser window, navigate to
api.mydomain.comor your chosen record, and then enter your name and email address.
- For the password, use the instance ID. For example,
- In a new browser window, configure the server by following this. Use the EC2 instance ID as your initial password.
Stpe 3: Creating the Dshop store
After launching the Dshop node and configuring the domain, you can create and customize the Dshop storefront.
Step 3.1 Choosing the payment settings
- In a new browser window, go to
api.mydomain.comand enter your credentials.
- Choose Settings and then Payments.
- To accept cryptocurrency payments, under Cryptocurrency Payments, choose Connect or enter an Ethereum wallet address manually. Skip this step if you do not want to accept cryptocurrency payments.
- Optionally, you can connect your Stripe or PayPal account and accept credit card payments. An Ethereum wallet isn’t required.
- To save the settings and return to the home page, choose Update.
Step 3.2 Customizing the store
- To create item listings, choose Products.
- To create public collections of certain product types to help customers navigate your listings, choose Collections. These collections appear on the storefront.
- To customize the look and feel of the store, choose Themes.
- To configure third-party integrations, manage shipping and tax settings, or access other advanced features, choose Settings.
- When you are finished, choose Publish Changes.
After you have finished, delete the deployed resources to prevent incurring ongoing costs. To do this, follow these steps:
- Delete the EC2 instance that you set up to launch the Dshop.
- Delete the Route 53 records associated with your Dshop.
In this blog post, I show how to launch a custom storefront that enables decentralized payments. You can accept cryptocurrency payments for your listings and start doing business globally without setting up accounts at payment processors or merchant banks.
About the authors
Matthew Liu is the cofounder of Origin Protocol. Matt was the third PM at YouTube (acquired by Google) and VP PM at Qwiki (acquired by Yahoo) and Bonobos (acquired by Walmart). He has an MS and BS from Stanford.
Kevin Goodspeed is a Senior Category Manager at AWS Marketplace with a focus on Blockchain and Emerging Technologies.