Test Webhooks
Emulate Receiving Webhooks
If you have not yet developed a web service for receiving webhooks and want to see examples of webhooks on real events happening to your orders, you can use specialized tools that will allow you to emulate the work of the web service.
You have to:
- Create a Mock Server for testing, e.g. using Postman (read the setup instructions on the Postman website)
- An Endpoint URL is provided for this web service
- Contact our support team to set up webhook sending to this URL
- Execute the order action that results in a webhook being sent on the event you require
- Check on your web service for testing (on the website where you have created it). You must be able to see the data of the webhook received
Emulate Sending Webhooks (examples of webhooks in Postman)
If you need to fine-tune your web service for receiveing webhooks, you can do so using our collection of Postman requests. Use the collection to send a webhook to the URL of your web service yourself, emulating our web service.
The collection uses the "secret_key" value as [secret key] when generating signatures.
To work with a collection:
- Import the collection into Postman. You have to insert the link leading to the collection into the Import window
- Select the request you want to send ➀
- Enter your web service URL in the field above ➁
- Click Send ➂
- You must see the response of your web service in the field below ➃
- The example shows how a response with HTTP 200 code must look like (indicates that your service has received the webhook successfully)
If you want to modify the text of the request, you can edit it via tab Body. For example, you can enter any of our examples into the request body.
Note that the contents of the request body affects a webhook signature. For correct emulation create the signature manually, as described in the documentation, and enter it in field signature via tab Header.