Vanilo Cloud Webhooks

In the Admin area it is possible to define Notifications.

Webhook is one type of notification, besides SMS and E-mail.

A webhook is in fact an HTTP call that will be triggered when a certain event happens in the E-commerce system.

To configure a webhook, the following parameters can be set.

Sender

Is currently not used for webhooks, leave it empty:

{}

Recipients

{
  "url": "https://endpoint.com/path",
  "method": "get|post"
}

No variable substitution occurs.

Content

{
  "headers": {
    "Auth": "12345",
    "Accept": "application/json"
  },
  "form": {
    "field1": ""
  },
  "payload": {
    "order_id": "",
    "order_number": "",
    "status": ""
  },
  "query": {
    "order_number": ""
  }
}
  • headers: HTTP headers to be sent along with the request. Works both with POST and GET
  • form: if this field is present, then the request will be sent as form ('application/x-www-form-urlencoded), and the fields will be taken from the values of form. Only works with POST gets ignored with GET
  • payload: The fields to send as JSON. Only with POST
  • query: Optional query fields for GET requests.

Variables

Variables can set in {{ order.number }} format. Whitespaces are ignored, so {{order.number}} works as well. Possible values:

  • order.id
  • order.number
  • order.email (the billpayer's email)
  • order.name (the billpayer's name)
  • order.total (along with the price eg. 29.9 €)
  • order.status
  • order.created_at*
  • order.ordered_at*
  • invoice.id
  • invoice.number
  • invoice.hash
  • invoice.emitted_on*
  • invoice.total
  • invoice.currency
  • invoice.pdf_url
  • invoice.pdf_base64
  • invoice.operator
  • invoice.remote_id

*: Datetime fields accept an optional format parameter like: {{ order.ordered_at|'j.n.Y H.i' }} which renders to 1.2.2023 16.03. The format string can be anything from here: https://www.php.net/manual/en/datetime.format.php#refsect1-datetime.format-parameters