Referenz

Field reference

Every field of the invoice object that the Creator and Validator APIs accept. This page is generated from the OpenAPI specification, so it cannot drift away from it.

147
fields
11
required on invoice
23
objects

Generated from Invoice.xhub API · POST /api/v1/invoice/{countryCode}/{format}/generate

One complete example

The same data the playground on the home page starts with — complete, with every required field.

json
1{
2 "invoice": {
3 "invoiceNumber": "RE-2025-001",
4 "type": "invoice",
5 "issueDate": "2025-01-15",
6 "dueDate": "2025-02-15",
7 "currency": "EUR",
8 "seller": {
9 "name": "Muster GmbH",
10 "vatId": "DE811128135",
11 "street": "Musterstraße 1",
12 "postalCode": "10115",
13 "city": "Berlin",
14 "countryCode": "DE",
15 "email": "info@muster.de",
16 "phone": "+49 30 12345678",
17 "bankAccount": {
18 "iban": "DE89370400440532013000",
19 "bic": "COBADEFFXXX"
20 }
21 },
22 "buyer": {
23 "name": "Beispiel AG",
24 "vatId": "DE136695976",
25 "street": "Beispielweg 42",
26 "postalCode": "80331",
27 "city": "München",
28 "countryCode": "DE"
29 },
30 "items": [
31 {
32 "position": 1,
33 "description": "Beratungsleistung",
34 "quantity": 10,
35 "unit": "HUR",
36 "unitPrice": 150,
37 "taxRate": 19,
38 "netAmount": 1500,
39 "taxAmount": 285,
40 "grossAmount": 1785
41 }
42 ],
43 "taxSummary": [
44 {
45 "taxRate": 19,
46 "netAmount": 1500,
47 "taxAmount": 285
48 }
49 ],
50 "subtotal": 1500,
51 "total": 1785,
52 "paymentTerms": {
53 "dueDays": 30,
54 "description": "Zahlbar innerhalb von 30 Tagen"
55 },
56 "countrySpecific": {
57 "countryCode": "DE",
58 "leitwegId": "991-12345-67"
59 }
60 }
61}

Three places where integrations get stuck

As soon as paymentMethods contains a credit transfer, EN 16931 (BR-61) requires the payment account identifier. Without seller.bankAccount.iban the invoice is rejected.

The unit of measure is a UN/ECE Rec 20 code, not free text: C62 (piece), HUR (hour), KGM (kilogram), MTR (metre), DAY (day). "Stk" or "piece" fails BR-CL-23.

If countrySpecific is set, countryCode inside it is required — even though the country code is already in the path.

All fields

invoice

Invoice data to generate document from

FieldTypeRequiredDescription
invoiceNumberstringrequiredUnique invoice number
Example: INV-2026-0042
typestringrequiredInvoice type
Allowed values: invoice, credit_note, proforma, correction
issueDatestringrequiredIssue date (ISO 8601: YYYY-MM-DD)
Example: 2026-03-20
dueDatestringrequiredDue date (ISO 8601: YYYY-MM-DD)
Example: 2026-04-19
deliveryDatestringoptionalDelivery/service date (ISO 8601)
Example: 2026-03-20
servicePeriodobjectoptionalService period (Leistungszeitraum). Required in DE if different from issueDate.
sellerobjectrequiredSeller party information
buyerobjectrequiredBuyer party information
itemsobject[]requiredInvoice line items
currencystringrequiredCurrency code (ISO 4217)
Example: EUR
subtotalnumberrequiredTotal net amount
Example: 4800
totalnumberrequiredTotal gross amount
Example: 5712
taxSummaryobject[]requiredTax summary per tax rate
paymentTermsobjectoptionalPayment terms
paymentMethodsobject[]optionalPayment methods accepted for this invoice. Used in ZUGFeRD/XRechnung to generate SpecifiedTradeSettlementPaymentMeans. For bank_transfer, seller.bankAccount must also be set.
orderNumberstringoptionalPurchase order number (Bestellnummer)
Example: PO-2026-0815
customerNumberstringoptionalCustomer number at the seller
Example: KD-42
contractNumberstringoptionalContract number (BT-12)
Example: V-2025-1234
projectNumberstringoptionalProject reference (BT-11)
Example: PROJ-2026-42
roundingAmountnumberoptionalRounding amount (BT-114)
Example: 0.01
allowancesChargesobject[]optionalInvoice-level allowances (discounts) and charges (surcharges) (BG-20 / BG-21). For line-level discounts, use items[].discount instead.
deliveryobjectoptionalDelivery information (BG-13). Includes delivery date (BT-72), deliver-to name (BT-70), location identifier (BT-71), and delivery address (BG-15).
directDebitMandateobjectoptionalSEPA direct debit mandate (BG-19). Required when paymentMethods includes direct_debit.
notesstringoptionalAdditional notes displayed on the invoice
Example: Vielen Dank für Ihren Auftrag!
profilestringoptionalXRechnung CIUS profile. `xrechnung` produces the standard CustomizationID `urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_3.0`. `xrechnung-extension` produces the EXTENSION CustomizationID `urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_3.0#conformant#urn:xoev-de:kosit:extension:xrechnung_3.0` which unlocks the additional XRechnung-EXTENSION business terms (subItems, third-party payments, ...). Defaults to `xrechnung` when omitted.
Allowed values: xrechnung, xrechnung-extension
referencedInvoiceNumberstringoptionalNumber of the previously issued invoice this document references (BT-25, BG-3). Used for credit notes, corrections, and partial-invoice chains. Renders as `<cac:BillingReference>` in UBL / `IncludedNote` reference in CII.
Example: INV-2026-0040
referencedInvoiceDatestringoptionalIssue date of the referenced invoice (BT-26, ISO 8601 YYYY-MM-DD). Pairs with `referencedInvoiceNumber`.
Example: 2026-03-15
deliveryNoteobjectoptionalDespatch advice / delivery note reference (BT-16 / BT-17). Renders as `<cac:DespatchDocumentReference>` in UBL.
thirdPartyPaymentsobject[]optionalThird-party prepaid payments (BG-DEX-09, ZUGFeRD EXTENDED). Each entry is rendered as `<cac:PrepaidPayment>` in UBL.
attachmentsobject[]optionalEmbedded supporting documents (BG-24 / BT-122..125). Rendered as `<cbc:EmbeddedDocumentBinaryObject>` in UBL.
serviceCategorystringoptionalService category hint for the German construction-tax flow. When set to `construction` and a line uses `taxCategoryCode: "AE"`, the generator emits the §13b UStG reverse-charge note automatically.
Allowed values: construction, general
constructionTaxobjectoptionalGerman construction-tax block (§13b UStG / §48 EStG). Setting `exemptionCertificateNumber` triggers the `#FREISTELLUNG#` note in the generated invoice. `withholdingPercent` documents the Bauabzugsteuer rate.
countrySpecificobjectoptionalCountry-specific invoice data. Must include countryCode matching the invoice country. For DE: buyerReference (BT-10, required), paymentMeansCode (BT-81), leitwegId (B2G), isKleinunternehmer (§19 UStG). Other countries have their own fields — see country-specific documentation.

servicePeriod

Service period (Leistungszeitraum). Required in DE if different from issueDate.

FieldTypeRequiredDescription
startstringrequiredPeriod start (ISO 8601: YYYY-MM-DD)
Example: 2026-03-01
endstringrequiredPeriod end (ISO 8601: YYYY-MM-DD)
Example: 2026-03-31

seller

Seller party information

FieldTypeRequiredDescription
namestringrequiredLegal name of the party
Example: Muster GmbH
tradingNamestringoptionalTrading name (if different from legal name)
Example: Muster Shop
streetstringoptionalStreet address
Example: Hauptstraße 42
additionalStreetstringoptionalAdditional address line
Example: 2. OG, Raum 5
citystringoptionalCity
Example: Berlin
postalCodestringoptionalPostal code
Example: 10115
countryCodestringrequiredCountry code (ISO 3166-1 alpha-2)
Example: DE
statestringoptionalState/region (ISO 3166-2)
Example: BE
taxIdstringoptionalNational tax identification number
Example: 27/123/45678
vatIdstringoptionalEU VAT identification number
Example: DE136695976
emailstringoptionalEmail address
Example: billing@muster.de
phonestringoptionalPhone number
Example: +49 30 12345678
websitestringoptionalWebsite URL
Example: https://muster.de
contactobjectoptionalStructured contact person (BG-6 for seller, BG-9 for buyer)
bankAccountobjectoptionalBank account (required on seller for SEPA bank transfers in ZUGFeRD/XRechnung). For direct debit (SEPA Lastschrift), buyer bankAccount is also required.
As soon as paymentMethods contains a credit transfer, EN 16931 (BR-61) requires the payment account identifier. Without seller.bankAccount.iban the invoice is rejected.

seller.contact

Structured contact person (BG-6 for seller, BG-9 for buyer)

FieldTypeRequiredDescription
namestringoptionalContact person name
Example: Max Mustermann
phonestringoptionalContact phone number
Example: +49 30 12345678
emailstringoptionalContact email address
Example: max@muster.de

seller.bankAccount

Bank account (required on seller for SEPA bank transfers in ZUGFeRD/XRechnung). For direct debit (SEPA Lastschrift), buyer bankAccount is also required.

FieldTypeRequiredDescription
ibanstringrequiredIBAN (International Bank Account Number)
Example: DE89370400440532013000
bicstringoptionalBIC/SWIFT code (8 or 11 characters)
Example: COBADEFFXXX
bankNamestringoptionalName of the bank
Example: Commerzbank
accountHolderstringoptionalAccount holder name (if different from party name)
Example: TechCorp GmbH

buyer

Buyer party information

FieldTypeRequiredDescription
namestringrequiredLegal name of the party
Example: Muster GmbH
tradingNamestringoptionalTrading name (if different from legal name)
Example: Muster Shop
streetstringoptionalStreet address
Example: Hauptstraße 42
additionalStreetstringoptionalAdditional address line
Example: 2. OG, Raum 5
citystringoptionalCity
Example: Berlin
postalCodestringoptionalPostal code
Example: 10115
countryCodestringrequiredCountry code (ISO 3166-1 alpha-2)
Example: DE
statestringoptionalState/region (ISO 3166-2)
Example: BE
taxIdstringoptionalNational tax identification number
Example: 27/123/45678
vatIdstringoptionalEU VAT identification number
Example: DE136695976
emailstringoptionalEmail address
Example: billing@muster.de
phonestringoptionalPhone number
Example: +49 30 12345678
websitestringoptionalWebsite URL
Example: https://muster.de
contactobjectoptionalStructured contact person (BG-6 for seller, BG-9 for buyer)
bankAccountobjectoptionalBank account (required on seller for SEPA bank transfers in ZUGFeRD/XRechnung). For direct debit (SEPA Lastschrift), buyer bankAccount is also required.
As soon as paymentMethods contains a credit transfer, EN 16931 (BR-61) requires the payment account identifier. Without seller.bankAccount.iban the invoice is rejected.

buyer.contact

Structured contact person (BG-6 for seller, BG-9 for buyer)

FieldTypeRequiredDescription
namestringoptionalContact person name
Example: Max Mustermann
phonestringoptionalContact phone number
Example: +49 30 12345678
emailstringoptionalContact email address
Example: max@muster.de

buyer.bankAccount

Bank account (required on seller for SEPA bank transfers in ZUGFeRD/XRechnung). For direct debit (SEPA Lastschrift), buyer bankAccount is also required.

FieldTypeRequiredDescription
ibanstringrequiredIBAN (International Bank Account Number)
Example: DE89370400440532013000
bicstringoptionalBIC/SWIFT code (8 or 11 characters)
Example: COBADEFFXXX
bankNamestringoptionalName of the bank
Example: Commerzbank
accountHolderstringoptionalAccount holder name (if different from party name)
Example: TechCorp GmbH

items[]

FieldTypeRequiredDescription
positionintegeroptionalLine item position number (BT-126 — zero-indexed line IDs are valid)
Example: 1
descriptionstringrequiredItem description
Example: Software Development Services — March 2026
articleNumberstringoptionalArticle/SKU number
Example: SVC-DEV-001
quantitynumberrequiredQuantity (negative values allowed for return/credit lines, EN 16931 BG-25)
Example: 40
unitstringrequiredUnit code (UN/ECE Rec 20)
Example: HUR
The unit of measure is a UN/ECE Rec 20 code, not free text: C62 (piece), HUR (hour), KGM (kilogram), MTR (metre), DAY (day). "Stk" or "piece" fails BR-CL-23.
unitPricenumberrequiredUnit price (net)
Example: 120
discountobjectoptionalLine item discount (BT-136 to BT-138)
taxRatenumberrequiredTax rate in percent
Example: 19
taxCategoryCodestringoptionalTax category code (EN 16931: S, Z, E, AE, K, G, O, ...)
Example: S
taxExemptionReasonstringoptionalTax exemption reason free text (BT-120)
Example: Reverse charge — Steuerschuldnerschaft des Leistungsempfängers
taxExemptionReasonCodestringoptionalTax exemption reason code (BT-121, VATEX code)
Example: VATEX-EU-AE
netAmountnumberrequiredNet amount (quantity * unitPrice)
Example: 4800
taxAmountnumberrequiredTax amount
Example: 912
grossAmountnumberoptionalGross amount (net + tax)
Example: 5712
lineSubtypestringoptionalSub-line-item type (BT-X-8, ZUGFeRD 2.4 EXTENDED). DETAIL = included in totals, INFORMATION = info only, GROUP = sum of sub-items.
Allowed values: DETAIL, INFORMATION, GROUP
parentLineIdstringoptionalParent line item position reference (BT-X-304, for hierarchical line items)
perPackageQuantitynumberoptionalQuantity per package unit (BT-X-561)
subItemsobject[]optionalNested sub-line-items (BG-DEX-01, ZUGFeRD 2.4 EXTENDED hierarchy). Each entry has the same shape as a top-level item and may itself have subItems. Use `lineSubtype` (DETAIL/INFORMATION/GROUP) on each sub-item to control how it contributes to totals.

items[].discount

Line item discount (BT-136 to BT-138)

FieldTypeRequiredDescription
typestringoptionalDiscount type: percentage or absolute amount
Allowed values: percentage, absolute
valuenumberoptionalDiscount value
Example: 50
reasonstringoptionalDiscount reason (BT-139)
Example: Mengenrabatt

taxSummary[]

FieldTypeRequiredDescription
taxRatenumberrequiredTax rate in percent
Example: 19
taxCategoryCodestringoptionalTax category code
Example: S
netAmountnumberrequiredNet amount for this tax rate
Example: 4800
taxAmountnumberrequiredTax amount
Example: 912
exemptionReasonstringoptionalTax exemption reason free text (BT-120)
Example: Reverse charge
exemptionReasonCodestringoptionalTax exemption reason code (BT-121, VATEX code)
Example: VATEX-EU-AE

paymentTerms

Payment terms

FieldTypeRequiredDescription
dueDaysnumberoptionalPayment due in days
Example: 30
descriptionstringoptionalPayment terms description
Example: Zahlbar innerhalb von 30 Tagen ohne Abzug
earlyPaymentDiscountobjectoptionalEarly payment discount (Skonto). E.g., 2% discount if paid within 10 days.

paymentTerms.earlyPaymentDiscount

Early payment discount (Skonto). E.g., 2% discount if paid within 10 days.

FieldTypeRequiredDescription
daysnumberrequiredDiscount valid within this many days
Example: 10
discountPercentnumberrequiredDiscount percentage (Skonto)
Example: 2

paymentMethods[]

Payment method

FieldTypeRequiredDescription
typestringrequiredPayment method type. Maps to UNTDID 4461 codes in e-invoices: bank_transfer / credit_transfer = 30 (Credit transfer), direct_debit=49 (SEPA Direct Debit), credit_card=48 (Card payment), cash=10, danish_fik=93 (DK Indbetalingskort FIK), giro=50 (DK postal giro), other=1.
Allowed values: bank_transfer, credit_transfer, direct_debit, credit_card, paypal, cash, danish_fik, giro, other
detailsstringoptionalAdditional details (e.g., "PayPal: invoice@example.com")
Example: SEPA-Überweisung

allowancesCharges[]

Invoice-level allowance (discount) or charge (surcharge)

FieldTypeRequiredDescription
isChargebooleanrequiredtrue = surcharge (BG-21), false = discount/allowance (BG-20)
Example: false
amountnumberrequiredAllowance/charge amount (BT-92 / BT-99)
Example: 100
percentagenumberoptionalPercentage (BT-94 / BT-101) — alternative to fixed amount
Example: 5
baseAmountnumberoptionalBase amount for percentage calculation (BT-93 / BT-100)
Example: 2000
reasonstringoptionalReason text (BT-97 / BT-104)
Example: Gesamtrabatt
reasonCodestringoptionalReason code per UNTDID 5189 (allowance) / 7161 (charge) (BT-98 / BT-105)
Example: 95
taxCategoryCodestringoptionalTax category code (BT-95 / BT-102)
Example: S
taxRatenumberoptionalTax rate in percent (BT-96 / BT-103)
Example: 19

delivery

Delivery information (BG-13). Includes delivery date (BT-72), deliver-to name (BT-70), location identifier (BT-71), and delivery address (BG-15).

FieldTypeRequiredDescription
datestringoptionalDelivery date (BT-72, ISO 8601)
Example: 2026-03-20
namestringoptionalDeliver-to party name (BT-70)
Example: Lager Nord
locationIdstringoptionalDelivery location identifier (BT-71)
addressobjectoptionalDelivery address (BG-15)

delivery.address

Delivery address (BG-15)

FieldTypeRequiredDescription
streetstringoptionalDelivery street (BT-75)
Example: Lagerstraße 10
additionalStreetstringoptionalAdditional delivery address line (BT-76)
citystringoptionalDelivery city (BT-77)
Example: Hamburg
postalCodestringoptionalDelivery postal code (BT-78)
Example: 20457
statestringoptionalDelivery state/region (BT-79)
countryCodestringoptionalDelivery country code (BT-80)
Example: DE

directDebitMandate

SEPA direct debit mandate (BG-19). Required when paymentMethods includes direct_debit.

FieldTypeRequiredDescription
mandateIdstringrequiredSEPA mandate reference (BT-89)
Example: MANDATE-2026-001
creditorIdstringrequiredSEPA creditor identifier (BT-90)
Example: DE98ZZZ09999999999
debitAccountIdstringoptionalDebited account IBAN (BT-91)
Example: DE89370400440532013000

deliveryNote

Despatch advice / delivery note reference (BT-16 / BT-17). Renders as `<cac:DespatchDocumentReference>` in UBL.

FieldTypeRequiredDescription
numberstringrequiredDespatch advice / delivery note number (BT-16).
Example: LS-2026-4711
datestringoptionalDespatch advice / delivery note date (BT-17, ISO 8601).
Example: 2026-03-19

thirdPartyPayments[]

Third-party prepaid payment (BG-DEX-09 / BT-DEX-001..003, ZUGFeRD EXTENDED)

FieldTypeRequiredDescription
typestringrequiredThird-party payment type identifier (BT-DEX-001). Free-form code chosen by the issuer (e.g., "voucher", "loyalty", "partial").
Example: voucher
paidAmountnumberrequiredAmount already paid by the third party (BT-DEX-002).
Example: 25
descriptionstringrequiredHuman-readable description of the third-party payment (BT-DEX-003).
Example: Geschenkgutschein eingelöst

attachments[]

Embedded attachment (BG-24 / BT-122..125)

FieldTypeRequiredDescription
filenamestringrequiredAttachment filename (BT-125).
Example: leistungsnachweis.pdf
mimeTypestringrequiredIANA media type of the attachment (BT-125-1).
Example: application/pdf
contentstringrequiredBase64-encoded binary content of the attachment (BT-125). Decoded payload should not exceed roughly 200 MiB (KoSIT alignment).
Example: JVBERi0xLjcKJeLjz9MK...
descriptionstringoptionalOptional human-readable description of the attachment (BT-123).
Example: Stundennachweis März 2026

constructionTax

German construction-tax block (§13b UStG / §48 EStG). Setting `exemptionCertificateNumber` triggers the `#FREISTELLUNG#` note in the generated invoice. `withholdingPercent` documents the Bauabzugsteuer rate.

FieldTypeRequiredDescription
exemptionCertificateNumberstringoptionalFreistellungsbescheinigung number per §48b EStG. When set, the generator emits a "#FREISTELLUNG#" note documenting the construction-withholding exemption.
Example: FB-2026-0042
withholdingPercentnumberoptionalConstruction withholding tax rate in percent (Bauabzugsteuer). Typically 15 in Germany when no Freistellungsbescheinigung is presented.
Example: 15
recipientTaxOfficestringoptionalTax office responsible for the recipient of the construction service.
Example: Finanzamt München

countrySpecific

Country-specific invoice data. Must include countryCode matching the invoice country. For DE: buyerReference (BT-10, required), paymentMeansCode (BT-81), leitwegId (B2G), isKleinunternehmer (§19 UStG). Other countries have their own fields — see country-specific documentation.

FieldTypeRequiredDescription
countryCodestringrequiredISO 3166-1 alpha-2 country code identifying this country-specific block.
Example: DE
If countrySpecific is set, countryCode inside it is required — even though the country code is already in the path.

The full specification

This page covers the invoice object. The full OpenAPI specification with every endpoint is available as a file — for code generators, Postman or your own editor.

Open openapi-full.json