Overview
Introduction
Synchronous events refer to events or actions that are executed immediately within the same request/response cycle of the application. These events are typically triggered as part of the execution of a specific operation or workflow and are processed synchronously before the response is returned to the client.
Using webhooks for synchronous events will affect Saleor API response time. If used extensively, it can cause a significant performance impact on response times! Make sure that the App server can keep up with customers' requests.
These webhooks are run from the Saleor Core instance during GraphQL requests. As a result, the response data is sent to the client.
Examples of the use cases
- payment events -> payment processing
- shipment events -> shipping calculation
- tax events -> tax calculation
- transaction events
Permissions
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 protocol
Synchronous webhooks support only HTTP(S).
Webhook payloads are sent in POST requests with the application/json
body and expect the response of the same content type.
Available Webhook events
The Synchronous can be grouped into the following categories:
- Payment events: allow delegating payment handling to Saleor Apps
- Shipping events: allow Saleor Apps to control shipping methods available for checkouts and draft orders.
- Tax events: allow delegating tax calculations to Saleor Apps.
- Transaction events: allow delegating the transaction's action to Saleor App.
- Stored payment method events: allow delegating the management of stored payment method to Saleor App.
The WebhookEventTypeSyncEnum represents the latest list of synchronous webhooks.