Create Webhook
Webhook simplifies the way Apps communicate with each other, as it is triggered by an event in a source system. For instance, a Salla Merchant Store and / or Salla Apps Store sends the data payload to a destination system, for example the Developer's App.
This article guides the developer to stream or create a webhook for the App using the Salla CLI command salla app create-webhook
. The article will also explain how to add custom webhook headers.
📙 What you'll learn
Streaming webhook
For the utmost flexibility, the developer can stream a webhook for any event they want to receive by passing the event name, which can also be fetched from the Webhook endpoint. Run the following command to create a webhook:
salla app create-webhook <event.name>
Once the command is executed, a success message will be displayed below.
Custom webhook header
Customizing webhook headers, which is done via the Salla Partners Portal, can help the developer define the headers to show specific information about the events happening between their Apps and Salla stores.Â
To add a custom webhook header:
Login to Salla Partners Portal.
Click on the item My App menu on the left of the page.
Choose the App to add the Custom Webhook Header to.
Scroll down to the Webhook and Notification section.
Click on the Custom webhook header to display the custom header form.
- Add the Key and Value and click save.
:::tip[Note]
The developer can add up to 10 custom webhook headers.
:::