Skip to main content

ZUGFeRD

Introduction

This documentation provides a complete overview of the xRechnung object used in the createPdf endpoint for generating ZUGFeRD-compliant invoices. The xRechnung object contains key information required to create a legally compliant electronic invoice, following the specifications of the XRechnung format.

Payload Structure

The xRechnung object is part of the main payload sent to the createPdf endpoint. Below is the structure and detailed explanation of all properties within the xRechnung object.

Main Payload Structure

{
"report": "string",
"reportName": "string",
"configName": "string",
"archive": true,
"documentTypeId": 0,
"culture": "string",
"parameters": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"mainHostUrl": "string",
"xRechnung": {
"invoiceMain": { ... },
"additionalReferencedDocuments": [ ... ],
"despatchAdviceReferencedDocument": { ... },
"profile": 1,
"tradeLineItems": [ ... ],
"taxes": [ ... ],
"serviceCharges": [ ... ],
"receivableSpecifiedTradeAccountingAccounts": [ ... ]
}
}

xRechnung Object Details

1. invoiceMain

This object contains the main details of the invoice, including invoice number, dates, buyer, seller, and payment terms.

  • Type: object
  • Properties:
    • invoiceNo (string): The unique identifier of the invoice.
    • invoiceDate (DateTime): The date the invoice was issued.
    • paymentReference (string): Reference used for payments.
    • orderNo (string): The related order number.
    • orderDate (DateTime): The date of the related order.
    • currency (enum): The currency of the invoice. See currency enum.
    • buyer (object): Information about the buyer.
    • seller (object): Information about the seller.
    • notes (array): Notes related to the invoice.
    • paymentTerms (object): The terms of payment.
    • grandTotalAmount (decimal): The total amount of the invoice.
    • duePayableAmount (decimal): The amount due for payment.
    • Other related invoice properties.

2. additionalReferencedDocuments

This array contains documents that reference the invoice, such as orders or contracts.

  • Type: array
  • Properties:
    • id (string): Identifier of the referenced document.
    • issueDateTime (DateTime): Date and time the document was issued.
    • referenceTypeCode (enum): Reference type code. See referenceTypeCode enum.
    • attachmentBinaryObject (string): Base64 encoded binary object of the attachment.
    • filename (string): Filename of the attachment.
    • typeCode (enum): Type code for the document. See typeCode enum.

3. tradeLineItems

This array contains items or services billed in the invoice.

  • Type: array
  • Properties:
    • globalID (object): Global ID of the item or service.
    • sellerAssignedID (string): ID assigned by the seller.
    • name (string): Name of the item or service.
    • billedQuantity (decimal): Quantity billed.
    • lineTotalAmount (decimal): Total amount for the line item.
    • taxCategoryCode (enum): Tax category code. See taxCategoryCode enum.
    • netUnitPrice (decimal): Net unit price of the item.
    • unitCode (enum): Unit code for the item. See unitCode enum.
    • Other related line item properties.

4. taxes

This array contains detailed tax information applied to the invoice.

  • Type: array
  • Properties:
    • basisAmount (decimal): Amount on which the tax is calculated.
    • percent (decimal): Tax percentage.
    • typeCode (enum): Type of tax. See taxType enum.
    • categoryCode (enum): Tax category code. See taxCategoryCode enum.
    • exemptionReasonCode (enum): Reason for tax exemption. See exemptionReasonCode enum.

5. serviceCharges

This array contains additional charges applied to the invoice.

  • Type: array
  • Properties:
    • tax (object): Tax information related to the service charge (similar to taxes object).
    • amount (decimal): Amount of the service charge.
    • description (string): Description of the service charge.

6. receivableSpecifiedTradeAccountingAccounts

This array contains accounting accounts related to the trade, either receivable or payable.

  • Type: array
  • Properties:
    • tradeAccountID (string): ID of the trade account.
    • tradeAccountTypeCode (enum): Type of trade account. See tradeAccountTypeCode enum.

Enumerations

1. currency

Represents currency codes.

ValueDescription
0Euro (EUR)
1US Dollar (USD)
2British Pound (GBP)
3Swiss Franc (CHF)
4Japanese Yen (JPY)

2. schemeID

Identification schemes for IDs.

ValueDescription
0Unknown
1GLN (Global Location Number)
2DUNS (Data Universal Numbering System)
3VAT ID
4National Tax ID
5Other

3. country

Country codes.

ValueDescription
0Germany (DE)
1Austria (AT)
2Switzerland (CH)
3United States (US)
4United Kingdom (GB)

4. subjectCode

Subject codes for notes.

ValueDescription
0General Information
1Legal Information
2Payment Information

5. contentCode

Content codes for notes.

ValueDescription
0Free Text
1Legal Notice
2Payment Instruction
3Delivery Information

6. profile

Invoice profiles.

ValueDescription
1Basic Profile
2Comfort Profile
3Extended Profile
4EN 16931 Profile (XRechnung)

7. type

Invoice types.

ValueDescription
0Invoice
1Credit Note
2Debit Note
3Correction Invoice

8. referenceTypeCode

Reference type codes for documents.

ValueDescription
0Order Reference
1Despatch Advice Reference
2Delivery Note Reference
3Contract Reference

9. taxCategoryCode

Tax category codes.

ValueDescription
0Standard Rate
1Reduced Rate
2Zero Rate
3Exempt
4Reverse Charge

10. taxType

Tax types.

ValueDescription
0Value-Added Tax
1Sales Tax
2Service Tax

11. electronicAddressSchemeID

Electronic address schemes.

ValueDescription
88Email
89EDI (Electronic Data Interchange)
90Web Address

12. typeCode

Document type codes.

ValueDescription
50Attachment
51Image
52PDF Document

13. unitCode

Unit codes for line items.

ValueDescription
0Piece (PCE)
1Kilogram (KGM)
2Liter (LTR)
3Hour (HUR)
4Day (DAY)

14. paymentMeansTypeCode

Payment means type codes.

ValueDescription
0Bank Transfer
1Direct Debit
2Credit Card
3Cash

15. tradeAccountTypeCode

Trade account type codes.

ValueDescription
0Debtor Account
1Creditor Account
2General Ledger Account
3Cash Account

This documentation provides a complete and structured overview of the xRechnung object, including all properties and enumerations used in the payload.