{"id":37029630,"url":"https://github.com/codebarista-de/gallop","last_synced_at":"2026-01-14T03:34:09.950Z","repository":{"id":280325864,"uuid":"941589239","full_name":"codebarista-de/gallop","owner":"codebarista-de","description":"Java library for creating electronic invoices compliant to the XRechnung standard.","archived":false,"fork":false,"pushed_at":"2025-08-02T19:07:13.000Z","size":142,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-02T19:40:48.401Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codebarista-de.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-02T16:44:08.000Z","updated_at":"2025-08-02T19:04:30.000Z","dependencies_parsed_at":"2025-08-02T19:12:07.576Z","dependency_job_id":"1b77cfa5-b3d9-4cac-a119-ef829605819c","html_url":"https://github.com/codebarista-de/gallop","commit_stats":null,"previous_names":["codebarista-de/gallop"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/codebarista-de/gallop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebarista-de%2Fgallop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebarista-de%2Fgallop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebarista-de%2Fgallop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebarista-de%2Fgallop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codebarista-de","download_url":"https://codeload.github.com/codebarista-de/gallop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebarista-de%2Fgallop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T03:34:09.436Z","updated_at":"2026-01-14T03:34:09.927Z","avatar_url":"https://github.com/codebarista-de.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gallop 🐎 XRechnung Library\n\n[![Tests](https://github.com/codebarista-de/gallop/actions/workflows/test.yml/badge.svg)](https://github.com/codebarista-de/gallop/actions/workflows/test.yml)\n\nGallop is a Java library for creating electronic invoices (E-Invoices) compliant to\nthe [XRechnung standard](https://xeinkauf.de/dokumente/).\n\n    Specification: Standard XRechnung\n    Version: XRechnung 3.0.2\n    Release Date: June 20, 2024\n\nIt does not yet implement the whole specification. Contributions are welcome!\n\n## Why another e-invoice library?\n\nDespite the existence of several mature Java libraries for electronic invoice creation,\nnone provided what we needed: a permissive license combined with complete control over the output.\nGallop was built to fill this gap.\n\n### Gallop does not impose\n\nGallop does not manipulate your data. It writes the exact values you provide into the XRechnung XML,\nwith no calculations or transformations (aside from necessary XML escaping).\n\nThis preservation of your original values eliminates rounding discrepancies between source data and the final invoice.\nThis is ideal, when creating an e-invoice that must match an existing PDF invoice.\n\n### Gallop does not judge\n\nGallop does not validate the e-invoices it generates.\nIt will happily accept any input and do its best to create a valid e-invoice,\nbut will not notice or complain when the result does not meet all the rules specified in the XRechnung standard.\n\nThere are other tools like the [KOSIT Validator](https://github.com/itplr-kosit/validator)\nwhich verify that the generated XML is a valid X-Rechnung.\n\n## Usage\n\nAdd Gallop to your project via [Maven Central](https://central.sonatype.com/artifact/de.codebarista/gallop):\n\n**Gradle (Groovy DSL):**\n\n```groovy\ndependencies {\n    implementation 'de.codebarista:gallop:2.1.0'\n}\n```\n\n**Maven:**\n\n```xml\n\n\u003cdependency\u003e\n    \u003cgroupId\u003ede.codebarista\u003c/groupId\u003e\n    \u003cartifactId\u003egallop\u003c/artifactId\u003e\n    \u003cversion\u003e2.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Code example\n\nYou find this code in the `BuildInvoiceTest` class.\n\n```java\npublic class InvoiceGenerator {\n\n    public String generateInvoice() throws XRechnungWriterException {\n        Invoice invoice = Invoice.create()\n                .documentTypeCode(InvoiceType.COMMERCIAL_INVOICE.getValue()) // Define invoice type\n                .documentId(\"INV-2025-1001\") // Unique invoice identifier\n                .leitwegId(\"N/A\") // Buyer reference (BT-10)\n                .currency(\"EUR\") // Currency used for the invoice\n\n                // Payment details including method and terms\n                .paymentInstructions(PaymentInstructions.create()\n                        .meansType(PaymentCode.CASH)\n                        .meansText(\"Cash on delivery\")\n                        .paymentTerms(\"The goods remain our property until full payment is received.\"\n                                + \"\\nDate of service corresponds to invoice date.\"))\n\n                .issueDate(OffsetDateTime.now()) // Invoice issue date\n\n                // Seller details\n                .seller(SellerOrBuyer.create()\n                        .name(\"TechNova Solutions GmbH\")\n                        .address(PostalAddress.create()\n                                .addressLineOne(\"Innovationsstraße 15\")\n                                .city(\"Berlin\")\n                                .zipCode(\"10115\")\n                                .countryIsoCode(\"DE\"))\n                        .vatId(\"DE298765432\") // Seller VAT ID\n                        .electronicAddress(\"billing@technova.com\") // Electronic address for invoicing\n                        .contact(Contact.create()\n                                .name(\"Dr. Stefan Wagner\")\n                                .phone(\"+49 (0) 30 987654321\")\n                                .email(\"stefan.wagner@technova.com\")))\n\n                // Buyer details\n                .buyer(SellerOrBuyer.create()\n                        .name(\"Greenline Retail AG\")\n                        .address(PostalAddress.create()\n                                .addressLineOne(\"Einkaufsstraße 78\")\n                                .city(\"Hamburg\")\n                                .zipCode(\"20095\")\n                                .countryIsoCode(\"DE\"))\n                        .electronicAddress(\"finance@greenlineretail.com\")) // Electronic address for buyer\n\n                // Delivery information\n                .deliveryInfo(DeliveryInformation.create()\n                        .name(\"Greenline Retail AG - Warehouse\")\n                        .deliveryAddress(PostalAddress.create()\n                                .addressLineOne(\"Lagerstraße 5\")\n                                .city(\"Hamburg\")\n                                .zipCode(\"21079\")\n                                .countryIsoCode(\"DE\")))\n\n                // Invoice items\n                .items(List.of(\n                        Item.create()\n                                .id(1L)\n                                .name(\"Ergonomic Office Chair\")\n                                .sellerAssignedId(\"CHAIR-ERG-2025\") // Seller's internal product ID\n                                .quantity(2L) // Quantity purchased\n                                .unitPrice(new BigDecimal(\"199.99\")) // Price per unit\n                                .itemTotalNetAmount(new BigDecimal(\"399.98\")) // Total price without VAT\n                                .unitCode(UnitCode.PIECE) // Unit of measurement\n                                .vat(Vat.create()\n                                        .rate(BigDecimal.valueOf(19)) // VAT rate (19%)\n                                        .category(TaxCategory.STANDARD_RATE)),\n                        Item.create()\n                                .id(2L)\n                                .name(\"Wireless Mechanical Keyboard\")\n                                .sellerAssignedId(\"KEY-MECH-WL\")\n                                .quantity(1L)\n                                .unitPrice(new BigDecimal(\"129.50\"))\n                                .itemTotalNetAmount(new BigDecimal(\"129.50\"))\n                                .unitCode(UnitCode.PIECE)\n                                .vat(Vat.create()\n                                        .rate(BigDecimal.valueOf(19))\n                                        .category(TaxCategory.STANDARD_RATE))))\n\n                // VAT breakdown\n                .vatTotals(List.of(\n                        Vat.create()\n                                .rate(BigDecimal.valueOf(19))\n                                .category(TaxCategory.STANDARD_RATE)\n                                .taxableAmount(BigDecimal.valueOf(529.48)) // Taxable amount\n                                .taxAmount(BigDecimal.valueOf(100.60)) // VAT amount\n                ))\n\n                // Invoice totals\n                .lineTotalAmount(new BigDecimal(\"529.48\")) // Total of all line items\n                .taxBasisTotalAmount(new BigDecimal(\"529.48\")) // Tax basis total\n                .taxTotalAmount(new BigDecimal(\"100.60\")) // Total VAT amount\n                .grandTotalAmount(new BigDecimal(\"630.08\")) // Invoice total with VAT\n                .paidAmount(new BigDecimal(\"100.00\")) // Already paid amount\n                .duePayableAmount(new BigDecimal(\"530.08\")) // Amount due for payment\n\n                // Sales order reference\n                .salesOrderReference(\"SO-98765\");\n\n        // Generate the XRechnung XML from the invoice\n        byte[] xRechnungXML = XRechnungWriter.generateXRechnungXML(invoice);\n        return new String(xRechnungXML);\n    }\n}\n```\n\n### Changelog\n\n- 2.1.0: Add BT-30/BT-47 (Seller/Buyer legal registration identifier),\n         BT-32 (Seller tax registration identifier),\n         BT-33 (Seller additional legal information),\n         BT-113 (Paid amount)\n         and `NetAmount#getVatCategory`\n- 2.0.0: Gallop no longer relies on lombok, introduce fluent api\n- 1.0.1: Add action to publish to maven central\n- 1.0.0: Initial version\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebarista-de%2Fgallop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodebarista-de%2Fgallop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebarista-de%2Fgallop/lists"}