What is a web hook?

A webhook is an API concept that’s growing in popularity. As more and more of what we do on the web can be described by events, webhooks are becoming even more applicable. They’re incredibly useful and a resource-light way to implement event reactions.

So, what exactly is a webhook? A webhook (also called a web callback or HTTP push API) is a way for an app to provide other applications with real-time information. A webhook delivers data to other applications as it happens, meaning you get data immediately. Unlike typical APIs where you would need to poll for data very frequently in order to get it real-time. This makes webhooks much more efficient for both provider and consumer. The only drawback to webhooks is the difficulty of initially setting them up.

Some applications of web hooks are:

  • Notifications
  • Data Syncing
  • Modifications

How to create WebHook URL?

Create page in your site: updateResponse.aspx or updateResponse.php
Sample URL is given below:
http://yourdomainName/updateResponse.aspx?optxid=123456&accountid=404&transtype=1

Above URL will be hit based on POST method so once URL hits it will provide values for following parameters:

  • optxid: This will be Unique ID which operator provides after every recharge either Success/Fail. Ex: 123456
  • accountid: This will be your Unique ID for each transaction, which you will sent in every transaction to our system. Ex: 404
  • transtype: This will provide status whether your transaction/recharge was Successful or Failed. 1 = recharge was successful, 2 = recharge was failed