Category

Others

API + RESTful API. An introduction. Plain and simple

By | Others | No Comments

Connect!

From Appliance Plumbing Interface…

Imagine that you have just designed a water faucet/ tap which dispenses water only if your fingerprint matches (however strange this may sound, I believe creativity should know no bounds ;). Now, for this to be actually used in a real wash-room or a kitchen sink, it needs to have a receptacle that exactly fits the common water pipe end-point. Lets say, it needs to have the female threaded end 1/2 inch diameter pipe to couple neatly into the male threaded pipe end. In other words, this new contraption of yours needs to follow the same plumbing interface definition as the pipes it needs to work with.

…To Application Programming Interface

Now, imagine if you were more of a software dude/ dudette than a pipe-hardware one. You might design a piece of software that will allow money from your bank to flow out only if your fingerprint matches (this sounds a lot more familiar, right? :). For this widgety creation of yours to be actually used in a real banking app or website, it needs to be able to be ‘integrated’ into the money flow interface definition of the bank(s). As a developer of this new functionality, you therefore need to follow what is called as the Application Programming Interface (API) definition exposed by the banking entity that you intend your software to work with. There you are! You have been hereby introduced to APIs. Simple right?

Why API?

The advantage of defining an API is this. Once defined, and published, it opens your platform up to a limitless set of different applications by independent innovators. So you might see some developer making an app that sends money from a bank account every time someone likes her profile pic on Facebook, or another who develops an app that makes a donation to a random NGO every time you use a swear-word on twitter…I hope you get the drift. There is no limit to the variety of innovation this can spawn. And all this while you enjoy a nice cold iced lemon tea reading some news-feed on your tab.

In short, APIs decouple application use cases, innovation, revenue generation and growth from your core platform. The better defined your APIs and the partner on-boarding processes are, the more you can relax and count the beans 🙂

API is also important because it helps make as much sense of the options available, to the humans implementing it as it does to the machines consuming or exposing it. This is an act of fine balance.

An API once said, “I need some REST”

Lets now focus on something a bit more technical. RESTful APIs. For a start, Restful does not refer to the relaxation that I’d mentioned a short while ago. The REST in RESTful refers to REpresentational State Transfers.

From verbs…

A lot of us have come from the functional programming world. In simple terms, the interfaces defined there would correspond to the verbs that were being exposed. For instance, in a banking app, you could have an interface defined as getBalance(account) which would return the account balance for a given account. Or, sendMoney(account1, account2). Or, listAccounts(customer). These functions could also be exposed as APIs and they do something based on its input parameters. The response of the API call would be the action defined as the verb and output parameters that would provide more details on the action done.

This kind of API has one inherent problem. An API description could be really arbitrary and it would be difficult to imagine all the functionality exposed without having explicit access to the API creator’s documentation.

…To nouns

RESTful APIs are a different breed altogether. They focus a lot more on the resources or nouns, instead of verbs. For example, ‘customer’ could be a resource, ‘account’ could be another and so on. As for the actual action that you would want to take with a resource, REST simplifies it all down to a set of pre-defined verbs in the WWW HTTP definition.

When you visit google.com, for example; the browser actually executes a GET request for the index page based on the URL (Uniform Resource Locator) http://www.google.com.

The idea (RESTful lends its origin to the doctoral thesis of a genius named Roy Fielding) is that, given these constant verbs; All that a developer needs to know is the set of objects/ nouns that he might have to deal with.

For instance, assume a simplified banking application. It may have a resource called customer or transaction or account. So, in the simplest sense, assume the base URL is https://myxyzbank. Now the base URL is like to rootdirectory for all resources (nouns). So, accessing a customer within the bank would likely be baseURL/customer.

There are a few more properties of RESTful APIs. I would only want to touch upon the fact that these API calls are also stateless. That is, a RESTful API call is in itself complete and independent of previous or future calls. In other words, the API calling entity’s state is not preserved on the server in between calls.

Singular and plural

Also noteworthy is the singular and plural use of these nouns.

While /customer/id refers to a particular customer with a given ‘id’ as its identity;

/customers/ refers to all the customers collectively.

So, executing an HTTP GET request on https://myxyzbank/customers should likely return a list of all customers within the bank, executing GET request on https://myxyzbank/customer/id would return a particular customer only. So, simple plain English “get a list of all customers in this bank” translates to an API, GET on https://myxyzbank/customers/ and the bank should spew out its long list (Of course it ain’t that simple. Security, roles, access and privileges have been excluded from the scope of this article).

Now back to the 4 main primitives and why they are pretty much sufficient for most applications.

Get, Post, Put and Delete is all you need

GET- as the name suggests would simply fetch the resource(s) identified
POST- use it when you intend to create a new resource(s) on the server
PUT- updates an existing resource on the server
DELETE- deletes the identified resource(s)

This sounds a lot like CRUD framework (Create, Read, Update, Delete) used for data storage.

Parameters

Additional parameters could also be passed to and from the server along with each resource request. This data could be in different formats, the most popular and elegant one around is called JSON (Java Script Object Notation). Another excessively verbose and elaborate protocol from our good ‘ol days is XML (Extensible Markup Language).

Beauty and the beast

There is a certain sense of beauty, logic, crispness and cleanness in the structure of truly RESTful API. The sad part is that most implement it with varying degrees of RESTful-ness. To the extent that I have even seen a bank call GET /getCustomerBalance as a RESTful API! That’s a verb on verb action and totally looses the plot.


My attempt was to only provide a plain and simple outline to API and RESTful API. There is a lot more in it and the world wide web should be your best guide.

May the POST be with you!
And May is hot!

Further reading:


O’Reilly,

Restful Web APIs https://www.amazon.in/dp/9351102971/ref=cm_sw_r_cp_apa_i_2A0fzbJN3CK5T


Eko ties up with Prabhu Money to Boost Money Remittance Business to Nepal

By | Others | No Comments

Eko has expanded its Indo-Nepal remittance (money transfer) services in partnership with Prabhu Money Transfer. Through these integrations, Eko enables it’s agents to remit money to a wider audience in Nepal. Eko’s first international tie-up for remittance services was with Nepal’s Prabhu Money Group in 2016. The service will benefit 30 lakh Nepali migrants living across India.

WhatsApp Image 2017-05-13 at 12.04.12 PM

The service enables Indian and Nepali citizens living in India to send money to their dear ones in Nepal, and the recipient can avail the cash “instantly”. Citizens of both the countries can use the remittance service in the form of cash to cash, cash to bank account, cash to co-operative bank account and through top-up remittance cards. Eko has an India wide network of retail agent outlets that provide various financial services to customers. For using the Indo-Nepal service, users need to provide their KYC to an Eko retail agent. The remitter needs to provide his Indian or Nepali identity proof, while the recipient needs to show his identity proof in Nepal to receive the cash (in case of cash to cash transfer).

Abhishek Sinha, cofounder and chief executive officer, Eko shared, “This expansion is another big achievement for Eko. Millions of Nepali citizens move to India for better career opportunities and to earn their livelihood. Sending money to their families in Nepal has always been a major challenge for them. This service will help Indo–Nepal migrants remit money to their loved ones in a faster, easier and secure way, and will also add to the revenue opportunity for Eko agents and distribution partners. This is yet another milestone in our journey towards establishing international tie-ups for money remittance.

He further added “Indo-Nepal remittance business is estimated to grow to rupees 200 crore per annum and we look forward to capture the opportunity, with our expertise in remittance business, our India wide network of Eko retail agents and now a Nepal wide network of remittance disbursal agents, branches and ATMs through this partnership with Prabhu money Transfer

Till now, Eko platform has securely processed more than rupees 5.90 crore. With Eko, a remitter can do transactions of 50,000 rupees per day and is allowed up to 12 transactions in a year. A fee of 150 rupees is charged for remitting up to 30,000 rupees and 200 rupees for remitting up to 50,000.

Introducing Connect Doodles. A platform that celebrates :)

By | Others | No Comments

The New Connect portal that our partners and merchants use, is a dynamic platform that has a life of its own! In India, we celebrate our diversity through festivals. Each festival has its own colors, sights, experiences and sounds. Beginning this month, Connect too will participate in each such celebration by sporting its own colors through campaigns, festive donations and associated online services.

Therefore, introducing Connect Doodles (of course, inspired by Google Doodles).

Featured here are our August Connect Doodles:

Independence Day. August 15th

connect_logo_indipendence_day

Rakshabandhan. August 18th

connect_logo_rakhi

Janmashthami. August 25th

connect_logo_janmashtami

Connect. Celebrate life. Celebrate diversity.

Celebrate sending money home 🙂

IMPS Success Rate – Highest in the Industry!

By | Others | No Comments

info_finalas

We are happy to share that Eko is one of the top 5 IMPS transactions originators in India among PPI licensees as per the latest NPCI (http://www.npci.org.in/) reports.

Not just that, Eko’s system has the lowest failure rates in the industry. Eko’s robust platform, built over 5 years of money transfer business experience, has resulted into an unbeaten 1.3% transaction decline rate compared to the industry average of 4.7%.

“Eko is one of the top 5 IMPS transactions originators in India among PPI licensees”

The platform has processed more than Rs 2,500 crore worth of IMPS transactions and more than Rs 8,000 crores of domestic money transfers in the country.

Currently, the platform is being used by:

–  More than 7,000 merchants

–  22 API partners, who use Eko’s money transfer APIs

“Eko’s system has the lowest transaction failure rate in the industry”

Another reason why Eko is the best partner for you! More information for API partner at Eko Developer Portal

 

Eko goes open source!

By | Money Transfer, Others, Remittance | No Comments

Team Eko is glad to announce that we are getting started with open source! You now have access to the best optimised algorithms and UI to process money remittance transactions at your merchant network.

Till date, this money transfer web application has processed more than Rs 4,000 crores and is being used by more than 2000 agents across the country.

Available now at: https://github.com/EkoHub/Money-Transfer-Web-Applicaton

blog p1

Now, partners/organizations can use this standalone website and deploy it on their systems. Developers can now modify the code and are free to develop or test our remittance APIs.

Frameworks used:

    1. Python
    2. Django framework 1.5
    3. Knockout.js
    4. Gumby framework

It is recommended to run the project in Virtual Environment  instead of changing the global installations as it stores all the dependencies required for this project in the Project folder itself .

Instructions

  1. Download or Clone the Repository
  2. Please go through readme.txt for installation instructions
  3. After installation (including population of database), please review the workflow
  4.  Workflow
    1. Capture Sender Details
      • The merchant/agent enters “Sender Mobile Number” and presses “Go” button. This invokes “Get Customers API” which returns the following scenarios:
      • If customer does not exist – Invoke “Create Customer API”, which fires an OTP to the customer’s mobile number. On entering the OTP, the application invokes “Verify Customer API”.
      • If customer exists – Redirect to Recipient box
    2. Capture Recipient Details – In case customer exists, “Get All Recipients” API is invoked. If the list is empty or the customer wishes to send money to a new bank account, then the merchant/agent  can add a Recipient by clicking on “Add Recipient
      • Adding a recipient requires the merchant/agent to enter bank name, bank account details and recipient details. On entering the required details, the“Add Recipient APIgets  called. Different banks require different flows for adding a recipient efficiently, which has been explained here: http://blog.eko.co.in/add-recipient-workflow-simplified/
      • Selecting any recipient from the list invokes “Get Recipient API” and agent is taken to the Transaction box as shown in the image above.
    3. Capture Transaction Details
      1. Enter the amount of money to be sent and select the Transaction mode. Clicking on “Send moneybutton invokes Send Money API. The status of transaction is displayed as toast at the bottom of the webpage

This is yet another by-product of Eko’s Summer Internship  program under which we hire students from the best universities across the country and provide them a platform to explore our technology. The open source was developed by Siddharth Jandial (NIT J), Kunal Sachdeva (NIT J), Teja Surya (IIT D) and Alankar Verma (NIT R) under the guidance of Mr. Saurabh Mullick.


Recommended reading:

      1. Tutorial on Django – https://docs.djangoproject.com/en/1.9/intro/tutorial01/
      2. To know more about Virtual Environment – http://docs.python-guide.org/en/latest/dev/virtualenvs/

Add Recipient Workflow – Simplified!

By | Blog, Money Transfer, Others, Remittance, Workflow | No Comments

 

We, at Eko, continue to work on providing a seamless and hassle free payment and transaction experience to our merchants, customers and partners.

For sending money to a bank account, a bank account needs to be mapped to a customer’s wallet. For that purpose, “Add Recipient” API is required. However, since different banks require different field parameters for registering a bank account, we have designed a process that simplifies adding of a bank account to a customer wallet.

We have implemented the changes in workflow in our merchant portal “Connect” for money remittance business and now we want to share the same process with our API partners.

4 Simple Steps for adding a bank account

    1. Capture Bank Name – Enable your merchant/customer to first select the bank (figure 1) to which money needs to be transferred. On selecting the bank name, invoke Get Bank API and Eko shall return the following details about the bank like:
      1. Full Bank Name (parameter name “name”)
      2. Account Verification is available or not (parameter isVerificationAvailable) – This signifies if bank has enabled verification of bank account feature or not. If value returned is “1” then verification is available else it is not allowed.
      3. IFSC code required or not (parameter “ifsc_status”) – Signifies if the IFSC code is required for money transaction or not
      4. Channel available for money transfer (parameter name “available_channels”) – This signifies IMPS is available or not and if not then, NEFT channel needs to be pused. The following values signifies which channel is available:
        -> ALL : 0
        -> NEFT : 1
        -> IMPS : 2

        gif 1

    2. Enter Recipient’s Bank Account Details – As a second step, enable your merchant/customer to enter the following:
      1. Recipient’s Bank Account Number – Only bank account number is required for bank, for whom IMPS is available. The next step is point 3.
      2. IFSC Code – If IMPS is not available for the bank selected. The next step is point 4.
    3. Account Name Verification – If Account verification feature is available, then Account Name Info API needs to be invoked, which instantly pulls out the Name of the recipient by either pushing Rs 1 transaction via IMPS or from Eko’s database. In the example shown in figure 2, it shows that for banks like SBI, etc where IMPS is available and account verification is available, only bank account details are required and recipients details are returned in response to Account Name Info

      gif 2

    4. Capture Recipient Details – If Account verification feature is not available, then following recipient details are required:
      1. Recipient’s Name
      2. Recipient’s Mobile Number
      3. IFSC code of the recipient’s BankIn the example shown below, when “Abu Dhabi Commercial Bank” is chosen as bank, for which IMPS and account verification is not available, bank details and recipient details are required

        gif 3
        In the below example, the customer/merchant has selected “HDFC Bank”, for which IMPS is available but account verification feature is not available, and in such cases bank account number and recipient details are required.

        gif 4

After capturing the details of the recipients, “Add Recipient” API needs to be invoked.

How to launch money transfer services?

By | Blog, Money Transfer, Others, Remittance, Wallet | No Comments

blog image v4

You must be thinking that launching money transfer services in your merchant network would be a lengthy process. Eko has launched its APIs that allow you to launch money remittance services in your network in a jiffy. All you need to do is follow the five steps mentioned below:

1. Simply “Sign-in” on the developer portal developers.eko.co.in. and start experimenting with the staging APIs. If you like the APIs and it fulfills your requirements, please send an email to partnerships@eko.co.in with your contact details.

Within 24 hours, our team will get in touch with you and guide you through our on-boarding process & commercials.

2. Complete Documentation Process – As a next step, you just need two soft copies of the following KYC documents (as per the table below) to get you on-boarded. Please ensure that the copies are self-attested.

Picture1

We will send you two copies of the agreement. Please sign them and send it back to us.

3. Start API Integration – Create a working prototype of your remittance solution and share dummy user login and password with Eko team.

4. UAT Signoff – Eko’s Compliance and Quality Assurance team shall do a UAT of your solution in order to check if integration is consistent with http://blog.eko.co.in/enable-remittance-services-using-eko-apis/. Once Eko gives UAT signoff to the prototype, production credentials would be shared along with operational information.

5. Go Live – You would need to replace staging credentials with production credentials and staging URL with production URL in your code. And your product will be ready for launch!