Why you really should take a look at a RESTful API?
As you might already know, we have recently released a new API here at PayLane. The reason we’ve done that we wanted our API to be accessible in any way possible – no matter which programming language or platform you would use to integrate with us. How have we achieved that?
We started to be more RESTful :)
What is REST?
In plain English, REST is an API design standard and technology that standardizes how API should be made and how it should work. But what is more important – the basic principles of REST say that your interfaces should not be tied/connected to any specific technology or language. Also, you really should focus on keeping your API as simple as possible in terms of its usage – you are giving access to your application to your future customers – do not let them down! RESTful APIs take a good use of what’s already there – the HTTP protocol. If we want to be more specific, they use basic Internet protocols to communicate with the outside world – and that’s pretty much all you need to know about it.
More technically – how do we use HTTP protocol in RESTful APIs?
In the previous paragraph you have been told that REST uses HTTP protocol to communicate. So, let’s take a look at what we can use. REST utilizes four of basic HTTP request such as POST, GET, PUT and DELETE. Once you understand how they work, it is very easy to understand how to use REST in a proper way.
- POST requests should function as normal internet forms that we fill out every day on various websites – i.e. when filling out the registration form at PayLane :) You really need to imagine them as packages with data that are transferred to the system to create something new.
- GET requests are rather selfexplanatory. They are used to obtain data from the server – i.e. accessing the payment status or information about income from our systems.
- PUT requests are widely used to update information that already is in the system – for example updating our address data or expiration dates.
- DELETE requests needs no explanation at all – they erase data.
How did we implement a RESTful API at PayLane?
First off, we took a closer look at our API methods, such as PayPalAuthorization or SaleBy3DSecureAuthorization and compared them with REST principles – they were simply too long and too complicated to remember. Secondly, we have categorized our methods to fit proper HTTP protocol methods such as GET sales/info. With all those things combined, our IT department started to work on preparing a stable API and combine it with our final product.
Am I required to use new RESTful API?
No, but we strongly recommend you to do so. New API isn’t just a refreshed design. It is also new redirects methods and other advantages that allow your business to create new solutions that will generate more income for you in the future. One of those examples might be a new mobile application for your customers that will use PayLane as your payment gateway – mobile applications just love to communicate with RESTful APIs.
Sounds great! I want to know more.
Although we are very passionate about following good trends in API architecture, one blog post isn’t enough to explain all the aspects of RESTful APIs. For that purposes we highly encourage you to check out PayLane RESTful API Whitepaper that we’ve prepared for you. It’s free, so do not hesitate to download it and learn even more about this great technology standard!
If you will have any questions regarding the new API, do not hesitate to contact our IT department directly at – we are sure that our developers will answer any of your questions.