ZUGFeRD E-Rechnung mit eigenem Logo

Closeup of a sleek laptop keyboard and screen on a white background. Perfect for tech-related content.

Die finaX API erlaubt es seit Version 1.5.7 Logos in die PDF Datei von ZUGFeRD E-Rechnungen einzufügen. Dies ist vor allem für die Erzeugung von ausgehenden Rechnungen relevant. In diesem Blogpost zeigen wir anhand eines kurzen Beispiels wie dies möglich ist.

Zuerst wird das Logo in einem geeigneten Format benötigt – erlaubt sind PNG, WEBP, JPEG und SVG Dateien. Dieses muss in Base64 encodiert werden. Beispielsweise via: https://www.base64-image.de

Nun muss das Logo Objekt der Anfrage hinzugefügt werden:

"logo": {
  "file": "iVBORw0KGgoAAAANSUhEUgAAAMgAAABkCAIAAABM5OhcAAABIklEQVR4nOzSwQnAIADAwFK6ROd1Z98uYRDkboI88v1zPLDbezqAOxmLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIrAAAAP//HwoCXVdSdQ0AAAAASUVORK5CYII=",
  "type": "png"
}

Die gesamte Anfrage sieht dann ungefähr folgendermaßen aus:

{
    "invoice": {
        "invoice_number": "33445566",
        "invoice_issue_date": "2019-08-24",
        "invoice_type_code": 326,
        "invoice_currency_code": "AED",
        "vat_accounting_currency_code": null,
        "value_added_tax_point_date": "2019-08-24",
        "value_added_tax_point_date_code": null,
        "payment_due_date": "2025-01-07",
        "buyer_reference": "abs1234",
        "project_reference": "PID33",
        "contract_reference": "123Contractref",
        "purchase_order_reference": "98776",
        "sales_order_reference": "112233",
        "receiving_advice_reference": "rec98",
        "despatch_advice_reference": "desp98",
        "tender_or_lot_reference": "PPID-123",
        "invoiced_object_identifier": {
            "value": "string",
            "scheme_identifier": "AAA"
        },
        "buyer_accounting_reference": "4217:2323:2323",
        "payment_terms": "#SKONTO#TAGE=14#PROZENT=2.25#",
        "invoice_note": [
            {
                "invoice_note_subject_code": "INV",
                "invoice_note": "Please note our new phone number 33 44 55 66"
            }
        ],
        "preceding_invoice_reference": [
            {
                "preceding_invoice_reference": "inv123",
                "preceding_invoice_issue_date": "2019-08-24"
            }
        ],
        "seller": {
            "name": "Full Formal Seller Name LTD.",
            "trading_name": "Seller Business Name AS",
            "identifier": [
                {
                    "scheme_identifier": "0094",
                    "value": "Full Formal Seller Name LTD."
                }
            ],
            "legal_registration_identifier": {
                "scheme_identifier": "0094",
                "value": "987654321"
            },
            "vat_identifier": "NO999888777",
            "tax_registration_identifier": {
                "scheme_identifier": "VAT",
                "value": "NO999888777"
            },
            "additional_legal_information": "Share capital",
            "electronic_address": {
                "value": "string",
                "scheme_identifier": "0002"
            },
            "postal_address": {
                "address_line_1": "string",
                "address_line_2": "string",
                "address_line_3": "string",
                "city": "string",
                "post_code": "12345",
                "country_subdivision": "string",
                "country_code": "AD"
            },
            "contact": {
                "point": "Jens Jensen",
                "telephone_number": "876 654 321",
                "email_address": "jens.j@buyer.se"
            }
        },
        "buyer": {
            "name": "Buyer Full Name AS",
            "trading_name": "Buyer Trading Name",
            "identifier": {
                "scheme_identifier": "0094",
                "value": "SE8765456787"
            },
            "legal_registration_identifier": {
                "scheme_identifier": "0094",
                "value": "5560104525"
            },
            "vat_identifier": "SE8765456787",
            "electronic_address": {
                "value": "string",
                "scheme_identifier": "0002"
            },
            "postal_address": {
                "address_line_1": "string",
                "address_line_2": "string",
                "address_line_3": "string",
                "city": "string",
                "post_code": "12345",
                "country_subdivision": "string",
                "country_code": "AD"
            },
            "contact": {
                "point": "Jens Jensen",
                "telephone_number": "876 654 321",
                "email_address": "jens.j@buyer.se"
            }
        },
        "payee": {
            "payee_name": "Payee Name Ltd",
            "payee_identifier": {
                "scheme_identifier": "0094",
                "value": "FR932874294"
            },
            "payee_legal_registration_identifier": {
                "scheme_identifier": "0094",
                "value": "FR932874294"
            }
        },
        "seller_tax_representative_party": {
            "name": "Tax Representative Name AS",
            "vat_identifier": "FR932874294",
            "postal_address": {
                "address_line_1": "string",
                "address_line_2": "string",
                "address_line_3": "string",
                "city": "string",
                "post_code": "12345",
                "country_subdivision": "string",
                "country_code": "AD"
            }
        },
        "delivery_information": {
            "deliver_to_party_name": "Deliver name",
            "deliver_to_location_identifier": {
                "scheme_identifier": "0204",
                "value": "83745498753497"
            },
            "actual_delivery_date": "2019-08-24",
            "invoicing_period": {
                "invoicing_period_start_date": "2019-08-24",
                "invoicing_period_end_date": "2019-08-24"
            },
            "deliver_to_address": {
                "address_line_1": "string",
                "address_line_2": "string",
                "address_line_3": "string",
                "city": "string",
                "post_code": "12345",
                "country_subdivision": "string",
                "country_code": "AD"
            }
        },
        "payment_instructions": {
            "payment_means_type_code": "1",
            "payment_means_text": "Credit transfer",
            "remittance_information": "432948234234234",
            "credit_transfer": [
                {
                    "payment_account_identifier": "NO99991122222",
                    "payment_account_name": "Payment Account",
                    "payment_service_provider_identifier": "SSKMDEMMXXX"
                }
            ],
            "payment_card_information": {
                "payment_card_primary_account_number": "1234",
                "payment_card_holder_name": "John Doe"
            },
            "direct_debit": {
                "mandate_reference_identifier": "123456",
                "bank_assigned_creditor_identifier": "5060012349998",
                "debited_account_identifier": "12345676543"
            }
        },
        "document_level_allowances": [
            {
                "amount": 200,
                "base_amount": 1000,
                "percentage": 20,
                "vat_category_code": "S",
                "vat_rate": 25,
                "reason": "Discount",
                "reason_code": "104"
            }
        ],
        "document_level_charges": [
            {
                "amount": 200,
                "base_amount": 1000,
                "percentage": 20,
                "vat_category_code": "S",
                "vat_rate": 25,
                "reason": "Overtime",
                "reason_code": "ABD"
            }
        ],
        "document_totals": {
            "sum_of_invoice_line_net_amount": 2345,
            "sum_of_allowances_on_document_level": 200,
            "sum_of_charges_on_document_level": 200,
            "invoice_total_amount_without_vat": 2345,
            "invoice_total_vat_amount": 586.25,
            "invoice_total_vat_amount_in_accounting_currency": 586.25,
            "invoice_total_amount_with_vat": 2931.25,
            "paid_amount": 1000,
            "rounding_amount": 0,
            "amount_due_for_payment": 1931.25
        },
        "vat_breakdown": [
            {
                "vat_category_taxable_amount": 2345,
                "vat_category_tax_amount": 586.25,
                "vat_category_code": "S",
                "vat_category_rate": 25,
                "vat_exemption_reason_text": null,
                "vat_exemption_reason_code": null
            }
        ],
        "additional_supporting_documents": [
            {
                "supporting_document_reference": "AB23456",
                "supporting_document_description": "Time list",
                "external_document_location": "<http://www.example.com/index.html>",
                "attached_document": {
                    "content": "aHR0cHM6Ly90ZXN0LXZlZmEuZGlmaS5uby9wZXBwb2xiaXMvcG9hY2MvYmlsbGluZy8zLjAvYmlzLw==",
                    "mime_code": "application/pdf",
                    "filename": "Hours-spent.csv"
                }
            }
        ],
        "invoice_line": [
            {
                "invoice_line_identifier": "12",
                "invoice_line_note": "New article number 12345",
                "invoice_line_object_identifier": {
                    "scheme_identifier": "ATX",
                    "value": "AB12345"
                },
                "invoiced_quantity": 100,
                "invoiced_quantity_unit_of_measure_code": "H87",
                "invoice_line_net_amount": 2345,
                "referenced_purchase_order_line_reference": "3",
                "invoice_line_buyer_accounting_reference": "1287:65464",
                "invoice_line_period": {
                    "invoice_line_period_start_date": "2019-08-24",
                    "invoice_line_period_end_date": "2019-08-24"
                },
                "invoice_line_allowances": {
                    "amount": 200,
                    "base_amount": 1000,
                    "percentage": 20,
                    "reason": "Discount",
                    "reason_code": "95"
                },
                "invoice_line_charges": {
                    "amount": 200,
                    "base_amount": 1000,
                    "percentage": 20,
                    "reason": "Overtime",
                    "reason_code": "ABD"
                },
                "price_details": {
                    "item_net_price": 23.45,
                    "item_price_discount": 100,
                    "item_gross_price": 123.45,
                    "item_price_base_quantity": 1,
                    "item_price_base_quantity_unit_of_measure_code": "H87"
                },
                "line_vat_information": {
                    "invoiced_item_vat_category_code": "S",
                    "invoiced_item_vat_rate": 25
                },
                "item_information": {
                    "name": "Item name",
                    "description": "Long description of the item on the invoice line",
                    "sellers_identifier": "9873242",
                    "buyers_identifier": "123455",
                    "standard_identifier": {
                        "scheme_identifier": "0002",
                        "value": "10986700"
                    },
                    "classification_identifier": [
                        {
                            "scheme_identifier": "AA",
                            "value": "9873242"
                        }
                    ],
                    "country_of_origin": "DE",
                    "item_attributes": [
                        {
                            "name": "Color",
                            "value": "Black"
                        }
                    ]
                },
                "sub_invoice_line": [
                    {
                        "invoice_line_identifier": "12",
                        "invoice_line_note": "New article number 12345",
                        "invoice_line_object_identifier": {
                            "value": "string",
                            "scheme_identifier": "AAA"
                        },
                        "invoiced_quantity": 100,
                        "invoiced_quantity_unit_of_measure_code": "H87",
                        "invoice_line_net_amount": 2145,
                        "referenced_purchase_order_line_reference": "3",
                        "invoice_line_buyer_accounting_reference": "1287:65464",
                        "sub_invoice_line_period": {
                            "invoice_line_period_start_date": "2019-08-24",
                            "invoice_line_period_end_date": "2019-08-24"
                        },
                        "sub_invoice_line_allowances": {
                            "amount": 200,
                            "base_amount": 1000,
                            "percentage": 20,
                            "reason": "Discount",
                            "reason_code": "95"
                        },
                        "sub_invoice_line_charges": {
                            "amount": 200,
                            "base_amount": 1000,
                            "percentage": 20,
                            "reason": "Overtime",
                            "reason_code": "ABD"
                        },
                        "sub_invoice_price_details": {
                            "item_net_price": 23.45,
                            "item_price_discount": 100,
                            "item_gross_price": 123.45,
                            "item_price_base_quantity": 1,
                            "item_price_base_quantity_unit_of_measure_code": "H87"
                        },
                        "sub_invoice_line_vat_information": {
                            "invoiced_item_vat_category_code": "S",
                            "invoiced_item_vat_rate": 25
                        },
                        "sub_invoice_line_item_information": {
                            "name": "Item name",
                            "description": "Long description of the item on the invoice line",
                            "sellers_identifier": "9873242",
                            "buyers_identifier": "123455",
                            "standard_identifier": {
                                "scheme_identifier": "0002",
                                "value": "10986700"
                            },
                            "classification_identifier": [
                                {
                                    "scheme_identifier": "AA",
                                    "value": "9873242"
                                }
                            ],
                            "country_of_origin": "DE",
                            "item_attributes": [
                                {
                                    "name": "Color",
                                    "value": "Black"
                                }
                            ]
                        },
                        "sub_invoice_line": []
                    }
                ]
            }
        ],
        "third_party_payment": [
            {
                "third_party_payment_type": "MobilesBezahlen",
                "third_party_payment_amount": 1,
                "third_party_payment_description": "Mobiles Bezahlen (Brutto-Forderung für Fremdleistungen)"
            }
        ],
        "version": "3.0.0",
        "extension": false,
        "validation_mode": "strict"
    },
    "config": {
        "intro_text": "Sehr geehrte Damen und Herren,\\n\\nIch bedanke mich für die gute Zusammenarbeit stelle Ihnen vereinbarungsgemäß folgende Leistungen in Rechnung.",
        "outro_text": "Bitte überweisen Sie den Rechnungsbetrag ohne Abzüge auf das angegebene Bankkonto.",
        "file_name": "rechnung.pdf",
        "logo": {
            "file": "iVBORw0KGgoAAAANSUhEUgAAAMgAAABkCAIAAABM5OhcAAABIklEQVR4nOzSwQnAIADAwFK6ROd1Z98uYRDkboI88v1zPLDbezqAOxmLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIrAAAAP//HwoCXVdSdQ0AAAAASUVORK5CYII=",
            "type": "png"
        }
    }
}

Sollte sich die via Base64 hinzugefügte Datei als invalide herausstellen wird “Invalid base64.” zurückgegeben.

Aktuell kann das Logo maximal 10cm breit bzw. 2cm hoch sein. Die Seitenverhältnisse der hinzugefügten Datei werden nicht verändert. Das Logo wird so groß wie möglich dargestellt. Wir empfehlen SVG, sodass keine Verpixelung entsteht.

Simpel – E-Rechnung mit eigenem Logo

Mit den Endpunkten der finaX API lassen sich ZUGFeRD E-Rechnungen einfach aus JSON, CII oder auch UBL erzeugen – und Logos hinzufügen. Dadurch können Sie mit der finaX API mühelos E-Rechnungen generieren, die dank Logo schnell und einfach von Ihren Kunden zugeordnet werden können.

Neben dem hybriden ZUGFeRD-Format unterstützt finaX auch XRechnung mit der Syntax UBL oder CII. Mehr über die Syntaxunterschiede finden Sie in unserem Blogartikel.

Klingt das interessant für Sie? Dann starten Sie direkt ganz einfach und unverbindlich mit unserem API-Key zum Testen.