What Are Webhooks?

What Are Webhooks?

ยท

3 min read

Hello! Monday people!! (don't hate the messenger, it's Monday you have a problem with not me ๐Ÿ˜‚). Today we're going to be looking at a feature of the software programming world that takes its inspiration from our day to day life as humans and as Monday people (ok I'll stop with the Monday thing now ๐Ÿ˜…).

relatable explanation.jfif

A RELATABLE EXPLANATION

Remember when we used to try to see a lecturer or some senior individual that we couldn't exactly reach out to via a call or text? a lot of times we wouldn't meet these people in their office, but if we were lucky, we'd meet someone whom we could drop our contact with with a "please send me a text when he/she gets back".

That act of leaving instructions and your contact information to be used to send you a specific type of information is the ideology that webhook is built on. No software solution is an island as such we build them to offer more utility by interacting with other software. We can both agree that it would be a waste of time and resources to visit the office of that person every hour till you see them when an alternative exists like having someone inform you of the presence of the person you're looking for.

child-4573129_1280.jpg

WEBHOOKS ARE LIKE OUR NOT-SO-SECRET INFORMANT

Webhooks are software solutions that are built to send a message to another software solution when a particular event occurs, it saves resources that would have been used in constantly checking on the platform you're expecting a response from. One of the popular applications of webhooks is in the e-commerce sector, we have payment processing platforms (fintech) that help you pay for things online. The e-commerce store you're purchasing from doesn't own the payment processing platform.

bells-2651369_1280.jpg

WEBHOOKS SAVE US FROM REPEATEDLY ASKING THE SAME QUESTIONS

At the same time, the fintech platform is helping the e-commerce store to process the payment as such, there has to be a way that the fintech platform communicates with the e-commerce store when a purchase is made. If a store has 1,000 active shoppers on the platform per second, it would be a huge waste of processor power (on both sides) if the store has to continuously ask the fintech platform if each active shopper paid for the product(s) they put on the cart.

finally.jfif

FINALLY

So webhooks basically ensures that the fintech platform is able to send a specific message when a customer pays among other details about a transaction. Webhooks are kind of like a one-way pager for software solutions. A lot of people compare APIs with webhooks, API facilitates two-way communication, while Webhooks only send a response (payload) when the agreed event occurs, it's like a knife and a hammer, both are useful for different scenarios and aren't a suitable replacement for one another.

I hope we at least learnt something new about how our exciting (yet complicated) internet works? see you tomorrow ๐Ÿ˜‰.