Search by

kirchdev / laravel-lexware-office

TitusKirch

Lexware Office (formerly lexoffice) API client for Laravel: typed resources, rate limiting, retries, and verified webhooks.

Package info

github.com/kirchDev/laravel-lexware-office

pkg:composer/kirchdev/laravel-lexware-office

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 3

v0.1.0 2026-12-05 16:32 UTC

This package is auto-updated.

Last update: 2026-12-05 17:36:16 UTC


README

๐Ÿ“ฆ laravel-lexware-office

Lexware Office (formerly lexoffice) API client for Laravel: typed resources, rate limiting, retries, and verified webhooks.

Latest Version on Packagist Total Downloads Tests PHP Version Laravel Version License

use KirchDev\LexwareOffice\Facades\LexwareOffice;

$invoice = LexwareOffice::invoices()->get($invoiceId);

Read the exact invoice total with $invoice->totalPrice->totalGrossAmount?->value.

๐Ÿ“ฆ Installation

Requires PHP 8.4+ with OpenSSL and Laravel 13.

composer require kirchdev/laravel-lexware-office

Set LEXWARE_OFFICE_API_KEY to the API key for your organization. The package registers its service provider automatically. Create a Lexware API key

๐Ÿš€ Quick start

Create a customer, then retrieve the contact by the ID in the action result.

use KirchDev\LexwareOffice\Data\{Contact, ContactRole, ContactRoles, Person};
use KirchDev\LexwareOffice\Facades\LexwareOffice;

$contacts = LexwareOffice::contacts();
$result = $contacts->create(new Contact(
    roles: new ContactRoles(customer: new ContactRole()),
    version: 0,
    person: new Person(lastName: 'Musterfrau', firstName: 'Inge'),
));

$customer = $contacts->get($result->id);
foreach ($contacts->list(name: 'Musterfrau', customer: true) as $match) {
    echo $match->id, PHP_EOL;
}

โœจ Features

  • ๐Ÿงพ Sales documents โ€” Create draft or finalized invoices, quotations and credit notes. Download their PDF or supported e-invoice representation.
  • ๐Ÿ“Ž Files โ€” Upload voucher bytes as multipart data. Read the file ID and voucher ID from the accepted upload.
  • ๐Ÿ”ข Exact decimals โ€” Use new Decimal('19.9900') for amounts, tax rates and quantities. The client writes JSON numbers and preserves their precision when reading.
  • โฑ๏ธ Shared rate limiting โ€” Workers sharing a cache coordinate requests per API key. The client handles throttling and temporary server failures. Retry and configuration contract
  • ๐Ÿ“ก Webhooks โ€” Register subscriptions and listen for signed events such as InvoiceStatusChanged. Webhook setup

โš™๏ธ Configuration

The default gateway is https://api.lexware.io. Set LEXWARE_OFFICE_CACHE_STORE to a shared cache that supports atomic add and increment for all workers using the same API key. To publish the configuration, run php artisan vendor:publish --tag=lexware-office-config. Configuration

๐Ÿค Contributing

Target dev and run the full gate locally. HTTP tests run against shared fixtures and the official signed webhook example. Development setup

๐Ÿ›ฃ๏ธ Versioning

Releases follow Semantic Versioning through release-please. The first release creates the changelog.

๐Ÿ“„ License

MIT ยฉ Titus Kirch / IT-Dienstleistungen Titus Kirch