Skip to main content
Version: 3.x

Asynchronous Events


Asynchronous webhooks can be used for reacting to the events emitted by Saleor.

The worker instance will send the event payload via the chosen protocol. Your App or service should acknowledge receiving the payload, by responding with HTTP 200 status. If a successful response has not been received, for example in the case of temporary service unavailability, the worker instance will retry delivery. The delivery is triggered a maximum of five times. Behind the scenes, Saleor uses an exponential backoff strategy with the retry interval calculated as 10 * (2**retries) seconds.

The asynchronous events are meant to be used for Apps or services that do not require processing on the Saleor side. If you need to send data back to the user (for example, calculated shipping cost), you should use a synchronous webhook.

Examples of the use cases

  • Sending an order confirmation to the company chat.
  • Synchronizing stocks with an external warehousing system.
  • Updating Elasticsearch or Algolia indexes after changing product descriptions.
  • Triggering frontend SSR for new pages.


Managing webhooks is available for users with the MANAGE_APPS permission. The App can also create and modify its own webhooks without the need for additional permissions.

Webhook protocols

Asynchronous webhooks support the following protocols:

  • HTTP(S)
  • Google Cloud Pub/Sub

A protocol is chosen based on the targetUrl scheme.


Webhook payloads are sent in POST requests.

All webhooks with targetUrl, where the scheme is HTTP(S) will use this protocol.

While HTTPS webhooks are a familiar concept and may seem easy to implement, ensure your endpoint can handle the same level of concurrency that you expect from the monitored events. Saleor Cloud will do its best to deliver webhooks in real-time, which could mean more traffic than your servers can handle. Because of this and the possibility of losing events when the destination server is down, we recommend using a queue like Google Cloud Pub/Sub or AWS SQS (see below).

Time limits

Webhook endpoints must respond within 20 seconds, including the network latency.

If your application performs long-running operations, consider using a task queue instead.

Fault tolerance

Event delivery will be retried up to 5 times with exponential backoff if:

  • the endpoint cannot be reached
  • the endpoint does not respond in time
  • the endpoint responds with a transient HTTP error code (5xx)

Event delivery will not be reattempted if:

  • the endpoint responds with an HTTP redirect (3xx)
  • the endpoint responds with a non-transient HTTP error code (4xx)

Sending webhooks to Azure Service Bus

You can use HTTP webhooks to deliver messages to Azure System Bus queues.

To do this, set the endpoint address to the HTTP endpoint of the Azure Service Bus queue or topic.

The structure of targetUrl should be as below:


Then, add the following custom headers according to the Azure System Bus documentation:

  • Authorization
  • BrokerProperties

Note that Content-Type cannot be specified as a custom header and will be filled by Saleor when sending the webhook.

Google Cloud Pub/Sub

All webhooks with the gcpubsub scheme will be treated as the Google Cloud Pub/Sub webhooks. The structure of the targetUrl scheme should be as below:


To use the Google Cloud Pub/Sub properly, you need to set the GOOGLE_APPLICATION_CREDENTIALS environment variable.


All webhooks with the awssqs scheme will be treated as AWS SQS webhooks.

The structure of targetUrl should be as below:


FIFO queues (ending in .fifo) must be configured to have ContentBasedDeduplication enabled. MessageGroupID will be set to Saleor's domain name.

Available webhook events

The WebhookEventTypeAsyncEnum represents the latest list of asynchronous webhooks

Was this page helpful?