Webhooks

Understand webhooks

A webhook (also called Callback URL) is a web address called when an event occurs on your account.
Ex : when you close a sale (=event), we can send automatically the sale data to a specific webhook sale.

A webhook allows a dynamic behavior like invoking one or several scripts when an event occurs.
You don’t need anymore to ask every second or minute if the event happens. Hiboutik is telling you that the event has occurred. You save resources (API calls) and time (instantly informed).
Here are some examples :
– When you close a sale, you can sync the inventory of your website or send automatically a survey to your customer.
– When you create a product, you can launch a script to add also the product into your website back-office.
– When you update a customer form, you can automatically send him an email confirming the modification.

Add webhooks

From your account, yo can add a single webhook for different events in 'Settings/General settings/General settings'.
You can also create your webhooks from the API. This method enables to create different webhooks for the same event with specific settings.
By default, a webhook execution is synchronous, but you can allow your webhook to be asynchronous if you configure the webhook_async setting to 1. It is particularly recommended to use asynchronous webhook if your app takes time to send a response.

The API resource to create a webhook is:

POST /webhooks

Webhooks can be different for each point of sale in a multi-stores account.

Events that can activate a webhook are :

Webhook name Event
sale Close of a sale
product Add a product to a sale
payment Select/add/delete a payment method in a sale
customer Add/modify/delete a customer form
store_credit Add a store credit line in a customer form
product Add/modify/delete a product form
stock_order Receive/Unreceive a stock order (including a quantity update in a stock order)
timestamp Start/stop a timeline
schedule Add/modify/delete a schedule event
stock_transfer Confirm a transfer between stores
line_item_exchange Return/exchange a product on a sale

Receive webhook responses

Data are sent in POST with a x-www-form-urlencoded format to you webhooks, and are specific to the event that triggered the request.
For example, the Webhook sale will receive the data of the API resource GET /sales/{sale_id}.
If necessary, you can then use the Hiboutik API to get more information.

Send us a request

Click here

  • FR +33 (0)1 48 78 40 06
  • FR +41 (0)21 519 00 17
  • FR +32 (0)2 318 82 77
  • FR +34 (0)912 69 39 94