Download the PHP package xhubio/magento2-invoice-api-xhub without Composer

On this page you can find all versions of the php package xhubio/magento2-invoice-api-xhub. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package magento2-invoice-api-xhub

Invoice-api.xhub for Magento 2 / Adobe Commerce

CI License: OSL-3.0 Magento 2.4.4 – 2.4.7 PHP 8.1 – 8.3

Generate compliant e-invoices (PDF, XRechnung 3.0, ZUGFeRD 2.3/2.4) from Magento orders via the invoice-api.xhub.io service.

Screenshots

Admin Dashboard All settings expanded
Admin Dashboard after the plugin processed two test orders Stores → Configuration → Sales → Invoice-api.xhub — all three sections expanded
General settings Seller details with bank fields
General settings: API key, format, trigger, number format Seller Details with IBAN/BIC fields (required for ZUGFeRD B2B)
Orders list Order detail with metabox
Sales → Orders list Order detail page with the Invoice-api.xhub metabox

A 16-page PDF User-Guide with all installation, configuration and troubleshooting steps lives at docs/Invoice-api-xhub-User-Guide-v1.0.0.pdf.

Requirements

Install — Composer (recommended)

For developer-mode installs you can skip setup:di:compile; for production deploys it's required.

Install — manual (ZIP from GitHub)

  1. Download the latest magento2-invoice-api-xhub.zip from https://github.com/xhubio/magento2-invoice-api-xhub/releases
  2. Unzip into <magento-root>/app/code/Xhubio/InvoiceApiXhub/
  3. Run the same bin/magento commands as in the Composer install above

Configure

  1. Open the Admin panel -> Stores -> Configuration -> Sales -> Invoice-api.xhub
  2. Set your API Key (get one at https://console.invoice-api.xhub.io/api-keys)
  3. Set your Seller Details (name, VAT ID, address, email — these go on every invoice)
  4. Pick a Format (PDF / XRechnung / ZUGFeRD) and Country (14 EU countries)
  5. Choose the Auto-Generate Trigger — typically on_complete so an invoice is generated when an order reaches the "complete" state
  6. Optional: set a PDF Template ID from https://console.invoice-api.xhub.io/pdf/templates for custom branding
  7. Save Config and Flush Cache

Use

Automatic generation

When an order transitions to the configured trigger state (default: complete), the module:

  1. Maps the order to the invoice-api.xhub.io schema
  2. Calls the API to generate the file
  3. Stores the file under pub/media/invoice-api-xhub/<order_id>/
  4. Writes a row in xhubio_invoice_meta
  5. Adds a status-history comment on the order

If Attach to Order Email is enabled, the file is attached to the customer order confirmation.

Manual generation

On the order view page in admin, scroll to the Invoice-api.xhub section to:

Invoice number tokens

The Invoice Number Format setting accepts these tokens:

Token Expands to
{order_number} Magento order increment id (e.g. 000000123)
{order_id} Internal entity id
{year} Year of order creation (e.g. 2026)
{month} 2-digit month
{day} 2-digit day
{seq} Next sequence value (atomic, yearly reset)
{seq:0000} Same, zero-padded to 4 digits

Default: INV-{order_number}. A common production pattern: INV-{year}-{seq:0000}.

The sequence is atomic at the DB level via INSERT ... ON DUPLICATE KEY UPDATE current = LAST_INSERT_ID(current+1) — two simultaneous generates can never share a number even under load.

Schema

Two tables are created on setup:upgrade:

GDPR

The module subscribes to:

Hard-delete of orders is uncommon (tax retention rules — UStG: 10 years), but the hooks are there for the rare case.

Business model

Free open-source connector (OSL-3.0). The paid product is the invoice-api.xhub.io service — your API key represents your service subscription. See docs/BUSINESS-MODEL.md for details.

License

OSL-3.0 (Open Software License 3.0) — the Adobe Commerce Marketplace standard license. See LICENSE.md for the full text.

Support


All versions of magento2-invoice-api-xhub with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1 || ^8.2 || ^8.3
magento/framework Version ^103.0
magento/module-sales Version ^103.0
magento/module-config Version ^101.2
magento/module-backend Version ^102.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xhubio/magento2-invoice-api-xhub contains the following files

Loading the files please wait ...