Shopware Gateways: A Flexible Way to Extend Shopware

A Shopware gateway acts as a dedicated communication layer between a Shopware store and external App servers.

Each gateway is designed for a specific integration area, such as checkout processes, customer context handling, or in-app purchases, while relying on a shared execution model. This model is based on a synchronous request sent to the App server, followed by immediate response handling directly inside Shopware.

So, where do gateways come into play?

There are two primary ways to extend a Shopware store:

  • Plugins
  • Apps

One of the key advantages of the App system, besides being fully compatible with all Shopware cloud environments, is how it handles business logic. The complete logic lives on your own server, fully separated from the shop’s core codebase.

This separation allows you to update your App independently of the shop itself. Even during major Shopware upgrades, Apps usually remain unaffected or require only minimal adjustments.

The challenge with traditional App execution

A known limitation of the App system is its asynchronous nature.

Shopware defines multiple internal events, such as customer login or order cancellation. Apps can subscribe to these events using webhooks, which call endpoints on your App server whenever such events occur.

However, this mechanism only informs you that something has happened and provides related data. You can react using APIs, but you cannot directly influence or modify Shopware’s processing logic during the event itself.

Technically, App Scripts already allow some synchronous behavior, but they place logic back into the shop’s codebase, something many developers wanted to avoid.

Based on extensive community feedback, Shopware introduced a solution that enables synchronous logic execution while keeping all logic on the App server.

This enhancement to the App system is called Shopware gateways.