Building an e-commerce platform from scratch

TL;DR

My company has built an ecommerce website for runners/cyclists/people who want to buy energy gels - EnergyGels.com. This blog post outlines why as well as some of the technical implementation considerations/details.

The idea

I have always been intrigued by the idea of building and running an online shop. The idea hit me a number of years ago when I saw the domain name MemoryCards.co.uk for sale. It struck me that memory cards are extremely small (and therefore easy to store) yet in high demand. It was the kind of product that you could sell on your own without a huge warehouse and significant infrastructure. Unfortunately whilst the auction was on I was doing my weekly food shop. I had the auction up on my phone but ultimately decided that I could not be bothered.

In hindsight this may well have been a good thing. People do not buy memory cards any more. Phones come with too much space, and now we have 'The Cloud'. No-one needs extra storage.

Running

When I am not working I spend a lot of time running. I tend to consider myself a long distance runner - the marathon being my race distance of choice. Every time I attend a race expo you are met by swathes of energy gel producers: GU energy, Clif bar, Power gel and more (you can tell that I've only ever run international races). Big races tend to have a 'title' energy gel sponsor who provides energy gels on the course but I personally have always bought my own gels - the ones that I have tried in training and that I know work well with my body.

Marathons are the perfect opportunity to escape from reality for hours at a time and it became clear to me that energy gels were another of those products that are small, in demand, and easy to sell. The added benefit this time around is that as a runner I find myself in contact with my target market every day - they are my friends.

The domains

The deal was sealed when I noticed that EnergyGels.co.uk was available for registration. My companies background in domain names meant that after a bit of back and forth I was able to accquire EnergyGels.com too.

The platform

Working in software I am well aware of the number of ecommerce platforms available for aspiring ecommerce entrepeneurs (Shopify, Magneto, and WooCommerce to name a few). Working in software I am also aware of their downsides. The most obvious being a lack of flexibility.

Given that the whole premise of my idea was simplicity it seemed reasonable to spin up my own platform. In reality (as with all things software related) it was a little less simple than I had anticipated (but I feel that the end result was worth it).

In practice the main complexity of ecommerce systems is processing payments and I had a vague idea of how that could be acheived using either the Paypal API or Stripe.

In the end I settled on using Stripe. Whilst most people know of Paypal and I have previously utilised their API for subscription based payments, I do not consider them to be particularly reliable.

Amongst the people who I know and with whom I have worked Paypal are known them for being fairly bad at what they do. My own personal experiences are generally negative having had issues with their website being buggy and simply not working. Further to that, when you do have an issue it is nearly impossible to get in touch with a real human being to discuss it. It concerned me that I might have issues down the line with them holding the profits of my energy gel empire \s.

Stripe is perhaps less well known by 'Joe Public' but it is well known in software circles. They offer a complete and simple API for handling all sorts of types of payments in an easy and extensible manner. They also offer the lowest fees for European card holders (my target market) - an additional bonus.

Stripe takes out some of the complexity of handling credit and debit cards (such as Payment Card Industry Data Security Standards (PCI DSS) compliance). There are for example a lot of rules about handling and retaining payment data. By using Stripe we can handle payments without ever actually seeing your card number. In simple terms we hold a reference to the card on Stripes server and 'charge' the card by using that reference. If you are interested in seeing how that is achieved in code take a look at Stripe's saving cards documentation.

No CVV

One thing that was really interesting to me was the CVV code that I am so used to typing into websites when completing a purchase. With Stripe the customer needs to enter it once but does not need to re-enter it on future payment attempts.

From a security perspective this is a non-issue. One benefit of using Stripe is that they have the benefit of processing millions and millions of transactions daily from all sorts of end users. This means that they can analyse the data and payment patterns to build a highly reliable security product for discerning when payments are fraudulent or not.

I queried the Stripe support team on why they don't need CVV codes for recurring payments and they told me that various data retention rules mean that they are not allowed to.

"There are some ramifications around this, but effectively in storing card information the card networks stipulate that you can't link card detail to CVV in any way. This means that we're unable to re-check the CVV on later charges as extra authentication. In a number of cases trying to recheck CVV would actually be problematic; for recurring subscriptions or times when you're charged at a later stage (a hotel booking, for example)."

Their security software combined with the security protocol put in place by the banks that issue the cards are what protect you from fraudulent transactions.

3D Secure

One of those security protocols is 3D Secure which is essentially bank level verification of the authenticity of a transaction. 'Verified by Visa' is a well known 3D Secure process.

In my initial 'Checkout' implementation I had not even given consideration to 3D Secure. I had tested cards that do not require 3D Secure verification successfully but it suddenly hit me that here in the UK 3D Secure checks are often required. Given that my target market is the UK it is obviously important that we be able to take payments from UK based customers.

Stripe's API is generally very good. It is complete, well documented, and easy to implement. Unfortunately they have one singular oversight namely that as of the time of writing they don't offer appropriate test cards for their 3D Secure process.

Some cards require 3D Secure to be completed every time. Others require it to be completed once after which recurring payments can be processed without user interaction. They (have acknowledged to me that they) do not offer a test card for that second situation. I have no idea why not. As a software engineer it really grinds my gears when you can not appropriately test an API integration. That and the fact that it took me quite considerable time and effort to explain and have acknowledged the issue.

For now this is of no issue as EnergyGels.com does not offer subscriptions at the moment. In the interest of keeping our customers secure we ask them to complete the 3D Secure process each and every time that they complete an order (if required).

Marketing

The beauty of EnergyGels.com is that it is a business which I am extremely passionate about from all angles. I don't need to go to additional effort to market the product because my target audience are the people with whom I tend to interact anyway.

Replying to tweets from intrigued runners is not a chore - I find it interesting. Reviewing and/or writing about energy gels is not a problem because I use them myself. Taking photos and sharing them on instagram whilst completely new to me is interesting (and kind of amusing). Facebook provides me another platform through which I can interact with people who like similar things to me.

They say that you shouldn't mix business with pleasure but the way I have always run my company is to build products relating to things that are interesting and exciting to me. A friend of mine suggested that I build out a website pertaining to cars and MOTs. Whilst I absolutely saw the merit in the idea as a business, to be able to work on that business each and every day you really need to enjoy/take an interest in what you are doing. I don't really like cars. I don't even really drive anymore.

The plan

The website is live. You can buy High 5 energy gels or you can buy Science in Sport energy gels at this point in time. We want to see what energy gels people are buying, and discern what energy gels people would like to buy going forward.

As alluded to above, down the line we would like to offer a subscription service whereby we will send you a variety of interesting and exciting energy gels each week/month/quarter to fuel your training. If you know exactly what you want, we will send you exactly what you request. If you want to try gels from multiple brands.. we have got you covered.

We want to build out an ecommerce product focussing on a specific product - energy gels. In addition to that we want to provide useful content to our customers - consumers of energy gels - on how/when/why to consume energy gels.

We think it would be great to be able to find a detailled marathon training plan, read about how energy gels can help fuel your race, and buy said energy gels in one place. Yes - it is a business. We are trying to sell you energy gels. Where we differ however is that we want to explain to athletes why energy gels can help them and then allow them to make informed decisions.

I am a runner and I use energy gels myself. I use different brands in different situations. In the interest of impartiality they will remain nameless, but I use a combination of stodgy, caffeinated gels and isotonic liquid gels in my marathon races. Why? Because from my research and my testing that is what works best for me.

It is a niche. We want to be your source of energy gels and energy gel information.

Suggestions?

If you have suggestions or ideas, want to meet up, want to run together, want to teach me how to cycle etc etc just send us a note - hello [AT] energygels.com, find us on Twitter, Facebook, or Instagram.

Need some energy gels?