Shopware

Shopware Integration

Coming Soon

Native integration for Shopware 6. Use the Flow Builder for automatic e-invoices – optimized for B2B and enterprise.

Shopware 6 Plugin in Development

Our official Shopware 6 Plugin is currently in development. In the meantime, you can integrate Invoice-api.xhub via the Flow Builder with webhooks and n8n/Make.com.

Features

Shopware 6 Plugin

Native integration for Shopware 6 via the plugin system

Flow Builder

Configure e-invoices directly in Shopware Flow Builder

B2B Suite

Optimized for Shopware B2B Suite and wholesale

Rule Builder

Condition-based e-invoicing with the Rule Builder

Flow Builder Integration

Available Flow Events

Use the Shopware Flow Builder to create e-invoices based on shop events.

checkout.order.placed

New order placed

state_machine.order.state_changed

Order status changed

state_machine.order_transaction.state_changed

Payment status changed

state_machine.order_delivery.state_changed

Delivery status changed

json
1// Shopware Flow Builder Konfiguration
2// Admin → Einstellungen → Shop → Flow Builder
3 
4// Flow: "E-Rechnung bei Zahlung"
5{
6 "name": "E-Rechnung erstellen",
7 "eventName": "state_machine.order_transaction.state_changed",
8 "sequences": [
9 {
10 "actionName": "action.add.order.tag",
11 "config": { "tagId": "einvoice-pending" }
12 },
13 {
14 "actionName": "action.call.webhook",
15 "config": {
16 "url": "https://your-n8n.com/webhook/shopware-invoice",
17 "headers": {
18 "X-Invoice-Type": "xrechnung"
19 }
20 }
21 }
22 ],
23 "conditions": [
24 {
25 "type": "orContainer",
26 "children": [
27 {
28 "type": "toState",
29 "value": { "stateId": "paid" }
30 }
31 ]
32 }
33 ]
34}

Webhook → Invoice-api.xhub

Connect the Shopware Flow Builder with Invoice-api.xhub via an automation platform.

  1. 1

    Create Flow in Flow Builder

    Trigger: Payment status → Paid

  2. 2

    Add Webhook Action

    URL to n8n/Make workflow

  3. 3

    Transform Data

    Shopware format → Invoice-api.xhub format

  4. 4

    Create E-Invoice

    POST /api/v1/invoice/de/xrechnung/generate to Invoice-api.xhub API

typescript
1// Shopware Admin API → Invoice-api.xhub
2// Webhook empfängt Order-Daten von Shopware
3 
4const shopwareOrder = webhook.payload;
5 
6// Transform zu Invoice-api.xhub Format
7const invoiceData = {
8 type: "xrechnung-3.0",
9 seller: {
10 name: shopConfig.companyName,
11 vatId: shopConfig.vatId,
12 address: {
13 street: shopConfig.address.street,
14 city: shopConfig.address.city,
15 zip: shopConfig.address.zipcode,
16 country: "DE"
17 }
18 },
19 buyer: {
20 name: shopwareOrder.orderCustomer.company
21 || shopwareOrder.orderCustomer.firstName + " " + shopwareOrder.orderCustomer.lastName,
22 vatId: shopwareOrder.orderCustomer.vatIds?.[0],
23 address: {
24 street: shopwareOrder.billingAddress.street,
25 city: shopwareOrder.billingAddress.city,
26 zip: shopwareOrder.billingAddress.zipcode,
27 country: shopwareOrder.billingAddress.country.iso
28 }
29 },
30 items: shopwareOrder.lineItems.map(item => ({
31 description: item.label,
32 quantity: item.quantity,
33 unitPrice: item.unitPrice,
34 vat: item.tax.taxRate
35 })),
36 reference: shopwareOrder.orderNumber
37};
38 
39// POST zu Invoice-api.xhub
40const response = await fetch('https://service.invoice-api.xhub.io/api/v1/invoice/de/xrechnung/generate', {
41 method: 'POST',
42 headers: {
43 'Authorization': `Bearer ${XHUB_API_KEY}`,
44 'Content-Type': 'application/json'
45 },
46 body: JSON.stringify(invoiceData)
47});

Use Cases

B2B Wholesale

Automatic XRechnung for all B2B customers with VAT ID

  1. 1B2B customer group in Rule Builder
  2. 2Flow on payment receipt
  3. 3XRechnung with B2B conditions
  4. 4Peppol delivery to large customers

Multi-Channel

E-invoices for all sales channels

  1. 1Detect sales channel
  2. 2Channel-specific invoice data
  3. 3Unified format across all channels
  4. 4Central archiving

Subscription Commerce

Recurring e-invoices for subscriptions

  1. 1Subscription plugin integration
  2. 2Monthly XRechnung automatically
  3. 3Reference to subscription contract
  4. 4Automatic Peppol delivery

Want to be notified when the plugin is available?

Sign up and we will notify you as soon as the official Shopware 6 Plugin is available in the Shopware Store.