How to implement Stellar blockchain on existing ecommerce site
Tags: posts, blockchain, ecommerce, stellar
Published: 2019-03-30 10:02:58

---
title: How to implement Stellar blockchain on existing ecommerce site
published: true
tags: Posts,blockchain,ecommerce,Stellar
canonical_url: http://blog.adnansiddiqi.me/how-to-implement-stellar-blockchain-on-existing-ecommerce-site/
---

In the last [couple of posts](http://blog.adnansiddiqi.me/tag/stellar/), I had discussed the technical site of implementing [Stellar](https://stellar.org) blockchain in Python. Those posts stirred interest among many and I got emails about the implementation of it on existing web applications, especially e-commerce websites. Since the actual purpose got buried in lathe st two posts between the lines of code. So today, I am making an attempt to explain in a language that business people, the site owners or managers could understand. Keep reading!

I will be discussing a fictitious website that sells tea online, say allthings_tea.com_. They have a variety of tea products which are loved by thousands of customers. They have different local outlets as well as have a facility to sell online via credit card and wire transfer for both local and the customers in other cities. Like others, they also got to know about the latest blockchain technology and was interested to come up with their own blockchain based solution. It was not only for branding purpose but also to open a payment channel that is not only cheap but reliable too. It also gives an opportunity for those people to buy online who don’t have a credit card facility. The higherups of the _All Things Tea Ltd_ were already briefed about the basic working of the blockchain technology and they wanted to give blockchain a shot. After a few weeks of hunting, they got in touch with a _Stellah Consulting_, a company that implements stellar based blockchain in the companies. The teashop had already found Stellar to serve their purpose quite well due to its efficiency and flexibility provided by the product. After a few initial meetings between _All Things Tea Ltd_ and _Stellah Consulting_, the following things were finalized:

### Custom Token

The Teashop decides that they will come up with their own custom token, called, **TeaCoin** with a symbol _TC_. Initially, one million tokens will be released. The price of one _TC_ is **$5** which means that if someone deposits $100, he will get _20 TC. _

### User Registration and Wallet creation

As soon as a user gets registered, his wallet will be created. All the credentials will be transferred to him via email. There will be a limit set for each wallet. The company decided that each wallet can hold _500 coins_ that is, the customer can’t be given more than 500 coins. The customer has been given the option to pay equivalent FIAT cash, in this case, US Dollar, both via Credit Card and Wire Transfer. Since these will be company-owned wallets hence the private keys of these wallets will be owned by the company itself.  To avoid messing up with the existing database, a separate DB will be maintained that will take care of all blockchain related operations.

### Buying Tokens

The user now has been given the option to buy tokens. They may opt for a Credit card option or deposit amount via bank transfer. The later one will require a process to confirm the transaction before crediting the wallet.

### Buying Tea

Once tokens are credited, the user can purchase things on the website. The wallet balance appears on the existing website dashboard. The user will also be able to see his transaction on Stellar blockchain.

### Asking Refunds

The customers will also have the facility to return unused tokens and get the amount back. After initiating the refund request, the admin will go thru the application. Once approved, his cash amount will be credited to his account or credit card. The updated _TC_ balance will also now reflect on his wallet ledger.

## Conclusion

Implementing Blockchain as a payment gateway does not only give you an edge but it helps to acquire more customers. With Stellar, it gets easier and in a short span of time, you can make your existing solutions compatible with blockchain.