Developing a Credit System for a online Micro-store
|May 2, 2013||Posted by alex under Programming|
Lately, we’ve been busy and when we’re busy we tend to spend more hours working than blogging (I know, it’s unfortunate). Thankfully this week, with the nice weather rolling in and that fresh scent of summer on the way, we’ve managed to find the time to take a little breather and reflect on some our recent projects: a credit system and store for the échantillon gratuit bébé network that runs contests and offers gifts to new mothers in Canada.
To the user, the concept of the store seemed simple enough. Once they sign up to the website, they receive a certain number of credits. With these credits, they can order items listed on the site. If an item costs more credits than they have, they can simply refer a friend, register with an associated site on the network or perform a number of other social interactions with the program, each time raising their credit amount. Once they’ve selected all the items they want, they head to the “check-out” and use their credits to “buy” the items they want. The items are then sent to them, free of charge.
On the surface, the model of the site might appear similar to the microtransaction sites we often see associated with free-to-play games or smart-phone-applications where the user trades in real money for in program tokens. However, the the credits in this Credit Store have no cash value and cannot be purchased using real money. The only way a user can earn more credits is by bringing more users in to the network or signing up on additional related websites.
Behind the scenes, things were a little bit more complex. Since this wasn’t the run of the mill micro store and since it was connected with a number of related sites, the credit system we developed was custom-built for the website. In order to accurately list the number of credits associated with any count at any given time, the store has to be aware of the social actions taken by the users such as who they referring, whether these friends signed-up, whether they registered on other sites and how many credits they spent or earned.
In order to do this, we developed a system to speak with an API to get the session data from registered users to create their accounts and attach mini shopping carts to each account.
All in all, this is a perfect example of how a relatively complex system can be made so simple that user can sign up and take advantage of its services.