Shopware 5 VAT ID Validation Plugin Broken? Understanding the API Change and Potential Fixes
Shopware 5 VAT ID Validation Plugin: Navigating the API Deprecation
A recent forum discussion highlights an issue with the SwagVatIdValidation plugin for Shopware 5. The plugin, used to validate VAT IDs, relies on the XML-RPC interface (eVatr) of the German Federal Central Tax Office (Bundeszentralamt für Steuern). This interface has been officially deprecated since November 30, 2025, and has effectively stopped working, causing VAT ID checks to fail in Shopware 5 stores.
The original poster, AlexInno, pointed out that the plugin SwagVatIdValidation is affected by the change. They noted that the underlying issue is the switch from the old XML-RPC interface (https://evatr.bff-online.de/evatrRPC) to a REST API. They also inquired whether the Shopware team could provide an update or instructions on how to manually adapt the plugin.
Sacrofano provided a link to the new API documentation: https://api.evatr.vies.bzst.de/api-docs, noting that it now returns JSON instead of XML, and the status codes have been revised.
Other users chimed in with their experiences and workarounds. One user, Steffffi, mentioned setting the VAT ID check to '0' and manually verifying customers, as they only have a few to check each week. They also expressed concern about the limitations being imposed and the lack of updates for Shopware 5.
AlexInno clarified that setting the last option to “Yes” in the plugin configuration effectively disables the API connection, allowing customers to proceed without VAT ID validation.
Key Takeaways and Potential Solutions
- The SwagVatIdValidation plugin for Shopware 5 is broken due to the deprecation of the XML-RPC eVatr API.
- The German Federal Central Tax Office has switched to a REST API (https://api.evatr.vies.bzst.de/api-docs) which returns JSON.
- Possible Workarounds:
- Manually verify VAT IDs.
- Disable the API check in the plugin configuration (though this bypasses validation).
- A code-level fix involves adapting the plugin to use the new REST API. The file
BffVatIdValidiatior.phpwas mentioned as a possible location for the changes.
Code Snippets and Examples (Hypothetical)
While the exact code modifications are not provided in the forum, adapting the plugin would involve changing the API endpoint and adjusting the data parsing logic. For example, you might need to replace code that uses XML-RPC calls with code that uses cURL or PHP's file_get_contents to fetch the JSON data from the new API. Then, the JSON response would need to be parsed using json_decode.
// Example using cURL (Conceptual)
$ch = curl_init("https://api.evatr.vies.bzst.de/api/vatcheck?vatId=...");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$json = curl_exec($ch);
curl_close($ch);
$data = json_decode($json, true);
if ($data['valid']) {
// VAT ID is valid
} else {
// VAT ID is invalid
}
Note: This is a simplified example and would need to be adapted to the specific structure of the new API and the plugin's code.
Given that Shopware 5 is no longer officially supported, merchants are left to find their own solutions or migrate to a supported Shopware version.