HubSpot

HubSpot Integration

Available now

Generate 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 · Live

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:

1

Trigger: HubSpot event

A 'Closed Won' deal stage or a newly created HubSpot/Commerce Hub invoice starts the workflow.

2

Action: call invoice-api.xhub

Deal and contact fields (buyer, line items, VAT) are passed to the Generate or Validate operation.

3

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:

bash
1# Header für alle invoice-api.xhub-Requests
2Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxx
3 
4# sk_test_* Sandbox / Test
5# sk_live_* Produktion
6# 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

Zapier

~10 min

Fastest no-code path. HubSpot is a native Zapier trigger; 'Webhooks by Zapier' calls invoice-api.xhub.

  1. 1

    Trigger: HubSpot 'Deal in Stage' (Won) or 'New Invoice'

  2. 2

    Action: 'Webhooks by Zapier' → POST to the Generate endpoint

  3. 3

    Action: HubSpot – attach the file to the deal or email it

json
1# Zapier: HubSpot Deal XRechnung erzeugen
2 
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 Request
7# Method: POST
8# URL: https://service.invoice-api.xhub.io/api/v1/invoice/de/xrechnung/generate
9# Headers: Authorization: Bearer sk_live_xxx
10# Content-Type: application/json
11# 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

Make.com

~15 min

Visual builder with EU data centres. HubSpot 'Watch Deals/Invoices' as trigger, HTTP module calls xhub.

  1. 1

    Module 1: HubSpot CRM 'Watch Deals' (Stage = closedwon)

  2. 2

    Module 2: HTTP – POST to invoice-api.xhub (Authorization: Bearer …)

  3. 3

    Module 3: HubSpot 'Upload a File' – store the result on the deal

json
1// Make.com: HubSpot → ZUGFeRD erzeugen
2 
3// Modul 1: HubSpot CRM – "Watch Deals" (Stage = closedwon)
4// oder "Watch Invoices"
5 
6// Modul 2: HTTP – Make a request
7{
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 Deal
n8n

n8n

~20 min

Self-hostable with the native invoice-api.xhub Community Node. Full control over logic and data.

  1. 1

    Node 1: HubSpot Trigger – deal stage changed to 'closedwon'

  2. 2

    Node 2: Invoice-api.xhub (Community Node) – operation 'Generate'

  3. 3

    Node 3: HubSpot node – update the file on the deal

bash
1# n8n: HubSpot Deal E-Rechnung
2 
3# Node 1: HubSpot Trigger
4# 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: Generate
11# Country: de
12# Format: xrechnung
13# Invoice JSON: {{ $json }}
14 
15# Node 4: HubSpot Datei am Deal anhängen / E-Mail senden
16 
17# Community Node installieren:
18# Settings Community Nodes Install n8n-nodes-invoice-api-xhub

Direct API + HubSpot webhooks

Direct

For 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. 1

    Subscribe a HubSpot webhook to deal.propertyChange (dealstage) / object.creation

  2. 2

    Your endpoint calls invoice-api.xhub Generate

  3. 3

    Store the result on the deal via the HubSpot Files/CRM API

bash
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/hubspot
7 
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.json
13# { "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/files

HubSpot Commerce Hub alone vs. + invoice-api.xhub

What HubSpot does out of the box – and what invoice-api.xhub adds (as of 2026).

CapabilityHubSpot Commerce HubHubSpot + invoice-api.xhub
CRM & deal pipeline
Create invoices
EN-16931 / XRechnung XML
ZUGFeRD / Factur-X
KoSIT validation
Peppol dispatch
GoBD archiving
Country formats128

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.

  1. 1Trigger: HubSpot – deal stage 'Closed Won'
  2. 2Action: invoice-api.xhub → Generate (XRechnung / ZUGFeRD)
  3. 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.

  1. 1Trigger: HubSpot – new invoice in Commerce Hub
  2. 2Action: invoice-api.xhub → Generate (format per recipient)
  3. 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.

  1. 1Trigger: email attachment received (Zapier/Make/n8n)
  2. 2Action: invoice-api.xhub → Validate
  3. 3Action: HubSpot – set a 'Validated' property + errors on the contact

Native HubSpot app – planned

A native HubSpot workflow action and a Marketplace listing are on our roadmap. Until then every use case is already covered by the four paths above. Interested? Let us know – we prioritise by demand.

Early access & beta slots for interested teams.

Frequently asked questions

HubSpot + e-invoicing – briefly explained.

Make your HubSpot invoices compliant

Get a free API key and test your first HubSpot workflow in under 15 minutes. No credit card.