HubSpot Integration
Available nowGenerate e-invoices from won HubSpot deals and Commerce Hub invoices – available today, no servers of your own. Connect HubSpot to invoice-api.xhub via Zapier, Make.com, n8n or the direct API.
Available today – native HubSpot action planned
You can connect HubSpot right now – via Zapier, Make.com, n8n or the direct API with HubSpot webhooks. A native HubSpot workflow action is additionally planned.
Why invoice-api.xhub for HubSpot?
HubSpot (incl. Commerce Hub) creates invoices but – as of 2026 – is not EN-16931 compliant: no XRechnung, no ZUGFeRD, no Peppol. invoice-api.xhub closes exactly that gap.
HubSpot bills, but not compliantly
Commerce Hub invoices are PDF/HTML – without the structured EN-16931 XML that B2B and B2G recipients in Germany require.
xhub turns it into an e-invoice
A won deal or HubSpot invoice becomes a KoSIT-validated XRechnung or a ZUGFeRD/Factur-X PDF – archivable in a GoBD-compliant way.
Triggered by your deal flow
A 'Closed Won' deal stage or the creation of an invoice starts the workflow – via connector or HubSpot webhook.
E-invoicing mandate: the deadlines
Since 01/01/2025 German companies must be able to receive e-invoices. The issuing obligation phases in: from 01/01/2027 for companies above €800,000 revenue, from 01/01/2028 for everyone. HubSpot invoices don't meet the format (as of 2026) – with invoice-api.xhub you're prepared.
What the integration does
EN-16931 compliant
XRechnung 3.0.2 & ZUGFeRD 2.4, KoSIT-validated.
Deal-triggered
Fires on a won deal or a new HubSpot invoice.
No code required
Zapier, Make or n8n – connected by drag & drop.
GoBD-compliant
Audit-proof 10-year archiving optional.
How does the integration work?
An automation platform – or a HubSpot webhook – sits between HubSpot and invoice-api.xhub. The pattern is always the same:
Trigger: HubSpot event
A 'Closed Won' deal stage or a newly created HubSpot/Commerce Hub invoice starts the workflow.
Action: call invoice-api.xhub
Deal and contact fields (buyer, line items, VAT) are passed to the Generate or Validate operation.
Result: back into HubSpot
The finished XRechnung/ZUGFeRD is attached to the deal, emailed, or sent via Peppol.
Authentication
All invoice-api.xhub endpoints are authenticated with a Bearer API key. Create the key in the Console and pass it as a header:
1# Header für alle invoice-api.xhub-Requests2Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxx3 4# sk_test_* → Sandbox / Test5# sk_live_* → Produktion6# Den Key erzeugst du in der Console.Four ways to connect
From the fastest no-code path to the direct API with HubSpot webhooks – pick what fits your stack.
Zapier
~10 minFastest no-code path. HubSpot is a native Zapier trigger; 'Webhooks by Zapier' calls invoice-api.xhub.
- 1
Trigger: HubSpot 'Deal in Stage' (Won) or 'New Invoice'
- 2
Action: 'Webhooks by Zapier' → POST to the Generate endpoint
- 3
Action: HubSpot – attach the file to the deal or email it
1# Zapier: HubSpot Deal → XRechnung erzeugen2 3# 1. Trigger: HubSpot – "Deal in Stage" (z. B. "Closed Won")4# oder "New Invoice" (Commerce Hub)5 6# 2. Action: Webhooks by Zapier – Custom Request7# Method: POST8# URL: https://service.invoice-api.xhub.io/api/v1/invoice/de/xrechnung/generate9# Headers: Authorization: Bearer sk_live_xxx10# Content-Type: application/json11# Body:12{13 "invoice": {14 "invoiceNumber": "{{deal.id}}",15 "type": "invoice",16 "issueDate": "{{deal.closedate}}",17 "currency": "EUR",18 "seller": {19 "name": "Acme GmbH", "vatId": "DE123456789",20 "street": "Hauptstraße 1", "city": "Berlin",21 "postalCode": "10115", "countryCode": "DE"22 },23 "buyer": {24 "name": "{{company.name}}", "vatId": "{{company.vat_id}}",25 "street": "{{company.address}}", "city": "{{company.city}}",26 "postalCode": "{{company.zip}}", "countryCode": "DE"27 },28 "items": [{29 "position": 1, "description": "{{deal.dealname}}",30 "quantity": 1, "unit": "C62", "unitPrice": {{deal.amount}},31 "taxRate": 19, "netAmount": {{deal.amount}},32 "taxAmount": {{deal.tax}}, "grossAmount": {{deal.total}}33 }],34 "subtotal": {{deal.amount}}, "total": {{deal.total}},35 "taxSummary": [{ "taxRate": 19, "netAmount": {{deal.amount}}, "taxAmount": {{deal.tax}} }],36 "paymentTerms": { "dueDays": 30 }37 }38}39 40# 3. Action: HubSpot – Datei/Notiz am Deal (oder Gmail mit Anhang)Make.com
~15 minVisual builder with EU data centres. HubSpot 'Watch Deals/Invoices' as trigger, HTTP module calls xhub.
- 1
Module 1: HubSpot CRM 'Watch Deals' (Stage = closedwon)
- 2
Module 2: HTTP – POST to invoice-api.xhub (Authorization: Bearer …)
- 3
Module 3: HubSpot 'Upload a File' – store the result on the deal
1// Make.com: HubSpot → ZUGFeRD erzeugen2 3// Modul 1: HubSpot CRM – "Watch Deals" (Stage = closedwon)4// oder "Watch Invoices"5 6// Modul 2: HTTP – Make a request7{8 "url": "https://service.invoice-api.xhub.io/api/v1/invoice/de/zugferd/generate",9 "method": "POST",10 "headers": [11 { "name": "Authorization", "value": "Bearer sk_live_xxx" },12 { "name": "Content-Type", "value": "application/json" }13 ],14 "body": {15 "invoice": {16 "invoiceNumber": "{{1.dealId}}",17 "type": "invoice",18 "issueDate": "{{1.closeDate}}",19 "currency": "EUR",20 "seller": { "name": "Acme GmbH", "vatId": "DE123456789",21 "street": "Hauptstraße 1", "city": "Berlin",22 "postalCode": "10115", "countryCode": "DE" },23 "buyer": { "name": "{{1.companyName}}", "vatId": "{{1.vatId}}",24 "street": "{{1.street}}", "city": "{{1.city}}",25 "postalCode": "{{1.zip}}", "countryCode": "DE" },26 "items": [{ "position": 1, "description": "{{1.dealName}}",27 "quantity": 1, "unit": "C62", "unitPrice": "{{1.amount}}",28 "taxRate": 19, "netAmount": "{{1.amount}}",29 "taxAmount": "{{1.tax}}", "grossAmount": "{{1.total}}" }],30 "subtotal": "{{1.amount}}", "total": "{{1.total}}",31 "taxSummary": [{ "taxRate": 19, "netAmount": "{{1.amount}}", "taxAmount": "{{1.tax}}" }],32 "paymentTerms": { "dueDays": 30 }33 }34 }35}36 37// Modul 3: HubSpot – "Upload a File" / Notiz am Dealn8n
~20 minSelf-hostable with the native invoice-api.xhub Community Node. Full control over logic and data.
- 1
Node 1: HubSpot Trigger – deal stage changed to 'closedwon'
- 2
Node 2: Invoice-api.xhub (Community Node) – operation 'Generate'
- 3
Node 3: HubSpot node – update the file on the deal
1# n8n: HubSpot Deal → E-Rechnung2 3# Node 1: HubSpot Trigger4# Event: Deal – Stage geändert zu "closedwon"5# (oder Webhook-Node + HubSpot-Workflow-Webhook)6 7# Node 2: HubSpot – Get Company/Contact (Käuferdaten anreichern)8 9# Node 3: Invoice-api.xhub (Community Node)10# Operation: Generate11# Country: de12# Format: xrechnung13# Invoice JSON: {{ $json }}14 15# Node 4: HubSpot – Datei am Deal anhängen / E-Mail senden16 17# Community Node installieren:18# Settings → Community Nodes → Install → n8n-nodes-invoice-api-xhubDirect API + HubSpot webhooks
DirectFor developer teams: HubSpot webhook subscriptions (dealstage, invoice.creation) hit your endpoint, which calls xhub and writes the file back via the HubSpot Files API.
- 1
Subscribe a HubSpot webhook to deal.propertyChange (dealstage) / object.creation
- 2
Your endpoint calls invoice-api.xhub Generate
- 3
Store the result on the deal via the HubSpot Files/CRM API
1# Direkte API mit HubSpot-Webhooks (für Entwickler)2 3# 1. HubSpot-Webhook abonnieren (HubSpot App → Webhooks)4# Subscription: deal.propertyChange (property: dealstage)5# oder: object.creation (objectType: invoice)6# Ziel-URL: https://deine-app.example/webhooks/hubspot7 8# 2. In deinem Endpoint invoice-api.xhub aufrufen:9curl -X POST https://service.invoice-api.xhub.io/api/v1/invoice/de/zugferd/generate \10 -H "Authorization: Bearer sk_live_xxx" \11 -H "Content-Type: application/json" \12 -d @invoice.json13# → { "success": true, "format": "zugferd", "mimeType": "application/pdf",14# "filename": "INV-2025-001.pdf", "data": "JVBERi0x..." }15 16# 3. Ergebnis via HubSpot Files API am Deal/Kontakt ablegen:17# POST https://api.hubapi.com/files/v3/filesHubSpot Commerce Hub alone vs. + invoice-api.xhub
What HubSpot does out of the box – and what invoice-api.xhub adds (as of 2026).
| Capability | HubSpot Commerce Hub | HubSpot + invoice-api.xhub |
|---|---|---|
| CRM & deal pipeline | ||
| Create invoices | ||
| EN-16931 / XRechnung XML | — | |
| ZUGFeRD / Factur-X | — | |
| KoSIT validation | — | |
| Peppol dispatch | — | |
| GoBD archiving | — | |
| Country formats | 1 | 28 |
Typical use cases
How HubSpot teams use invoice-api.xhub.
E-invoice on closed-won deal
When a deal reaches 'Closed Won', an XRechnung is generated automatically and attached to the deal.
- 1Trigger: HubSpot – deal stage 'Closed Won'
- 2Action: invoice-api.xhub → Generate (XRechnung / ZUGFeRD)
- 3Action: HubSpot – attach the file to the deal, email the contact
Commerce Hub invoice → XRechnung
Every new Commerce Hub invoice is converted into an EN-16931-compliant XRechnung/ZUGFeRD and sent to the customer.
- 1Trigger: HubSpot – new invoice in Commerce Hub
- 2Action: invoice-api.xhub → Generate (format per recipient)
- 3Action: email the compliant e-invoice or send via Peppol
Validate incoming invoices
E-invoices arriving by email are validated against KoSIT schemas; the result is logged as a note/property on the contact.
- 1Trigger: email attachment received (Zapier/Make/n8n)
- 2Action: invoice-api.xhub → Validate
- 3Action: HubSpot – set a 'Validated' property + errors on the contact
Frequently asked questions
HubSpot + e-invoicing – briefly explained.