Flutterwave API: Thing’s I did wrong.
The first time I worked with APIs was about 2 months ago before I joined the Hotels.ng remote internship. It was Github’s API and considering the fact that I was following a tutorial, it was pretty simple.
Seeing the Flutterwave API tasks, I was confident. “I’ve worked with API before” I thought boastfully to myself. Mark Essien mentioned to us, about two or more times that we should read the documentation but I didn’t. So the first thing I learnt was:
Every API is different
You’ll probably hear the same terms used: Json, curl, response, parameters. True. But just like most programming languages have functions, variables, if-statements. We can’t say that they are the same, can we?
So after I established that (the hard way, mind you). I want on to read the documentation. The first time I was totally confused. This was soo not like Git’s! After a few hours, I tried again, with a little more patience. This time I understood it programmatically and got how to call it. I set to work but soon after, I was lost. What exactly am I doing?? My next point:
Understand the documentation
What can the Flutterwave APIs do?
“Everything you need to build reliable and secure payment experiences”
The documentation then shows us how we can do just that. Read it with an understanding of what you want to achieve. Which brings me to this:
Understand what you want to do.
Another thing I did wrong was to keep going over the documentation, trying to find answers to a task I didn’t understand. When you don’t understand the task, you tend to look for similar phrases in the documentation and task and think oh, that’s it. So, I needed to sit down and understand what I was trying to achieve. The API is not solving the problem for you. You are solving the problem using the API as a tool.
Test the API.
This is important especially if you are new to it. Postman is a useful tool for this. Fortunately, I learnt this on time from my team members. This is where you should do all your trial and error. Change parameters, see the different results and then choose which works for what you are trying to achieve.
I would have loved to give a real example on using Flutterwave’s API but I still need to really try it out and build my confidence on it.
Hope you enjoyed it.