About Webhooks

Use webhooks to get notified about events related to the Sourcehub flow such as products, customers, orders etc.

What are Webhooks

Webhooks (Web Callback, HTTP Push API or Reverse API) are one way that a web application can send information to another application in real-time when a specific event happens.

Unlike traditional API in case of Webhooks, you do not need to make a request. You receive the data when it is available. Sourcehub facilitates an integration via Webhook to transfer data from sourcehub platform to any other third party software. Use webhooks to get notified about events related to the Sourcehub. To retrieve existing data in our system, please use our REST API.

Webhook Vs API

APIs send you the data when you request it. For Webhooks, you do not need to make a request. You receive the data when it is available.

Example
If you need to know whether a new order placed by a customer, using APIs, you need to keep polling every few seconds until someone order. However, if you are using Webhooks, you can configure a webhook event order.new to receive notifications when a customer place an order.

When to Use Sourcehub Webhooks

You can use Sourcehub Webhooks to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL.

  • You can set up Webhooks from your Sourcehub Dashboard and configure separate URLs for Live mode and Test mode.
  • A Test mode webhook receives events for your test transactions.

Webbok Trigger

When a new event occur for specific organization, a notification is triggered.

Delivery Attempts and Retries

When the app to which Sourcehub system sending the webhook fails to send a response with a 2xx status code the Sourcehub system will consider the call as failed. The call will also be considered failed if the remote app doesn't respond within 5 seconds. When a webhook call fails, Sourcehub system will retry the call 4 more times. To not hammer the remote app Sourcehub system will wait some time between each attempt. By default, we wait 10 seconds between the first and second attempts, 100 seconds between the third and the fourth, 1000 between the fourth and the fifth and so on. The maximum amount of seconds that we'll wait is 100000, which is about 27 hours (Approximately). For past bookings, we also offer REST API option to fetch those details.

Application Running on Localhost

You cannot use localhost directly to receive webhook events as webhook delivery requires a public URL.

Application Running on Your Staging Environment

You can test your webhook integration in the staging environment before taking it live. You should set up webhooks in the Test mode. You can configure your staging host endpoint in test mode and receive test events on it.

Page Overview