Shopware Integration
Coming SoonNative 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.placedNew order placed
state_machine.order.state_changedOrder status changed
state_machine.order_transaction.state_changedPayment status changed
state_machine.order_delivery.state_changedDelivery status changed
1// Shopware Flow Builder Konfiguration2// Admin → Einstellungen → Shop → Flow Builder3 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
Create Flow in Flow Builder
Trigger: Payment status → Paid
- 2
Add Webhook Action
URL to n8n/Make workflow
- 3
Transform Data
Shopware format → Invoice-api.xhub format
- 4
Create E-Invoice
POST /api/v1/invoice/de/xrechnung/generate to Invoice-api.xhub API
1// Shopware Admin API → Invoice-api.xhub2// Webhook empfängt Order-Daten von Shopware3 4const shopwareOrder = webhook.payload;5 6// Transform zu Invoice-api.xhub Format7const 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.company21 || 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.iso28 }29 },30 items: shopwareOrder.lineItems.map(item => ({31 description: item.label,32 quantity: item.quantity,33 unitPrice: item.unitPrice,34 vat: item.tax.taxRate35 })),36 reference: shopwareOrder.orderNumber37};38 39// POST zu Invoice-api.xhub40const 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
- 1B2B customer group in Rule Builder
- 2Flow on payment receipt
- 3XRechnung with B2B conditions
- 4Peppol delivery to large customers
Multi-Channel
E-invoices for all sales channels
- 1Detect sales channel
- 2Channel-specific invoice data
- 3Unified format across all channels
- 4Central archiving
Subscription Commerce
Recurring e-invoices for subscriptions
- 1Subscription plugin integration
- 2Monthly XRechnung automatically
- 3Reference to subscription contract
- 4Automatic Peppol delivery