PHPackages                             composite/invoice-wrapper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. composite/invoice-wrapper

ActiveLibrary

composite/invoice-wrapper
=========================

Easy solution for Szamlazz.hu and Billingo invoicing integration

1.1.6(1y ago)2143MITPHPPHP ^8.2

Since Nov 13Pushed 1y ago2 watchersCompare

[ Source](https://github.com/Composite-Solutions/invoice-wrapper)[ Packagist](https://packagist.org/packages/composite/invoice-wrapper)[ RSS](/packages/composite-invoice-wrapper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (12)Used By (0)

🧾✨ Invoice Magic Wand for Laravel
=================================

[](#-invoice-magic-wand-for-laravel)

Unleash the alchemy of billing with Invoice Magic Wand for Laravel! 🪄📜

This mystical package conjures up invoices with a flick of your developer's wrist, transforming the mundane task of invoice generation into a delightful display of digital wizardry. Whether you're billing with **Billingo** or summoning statements with **Szamlazz.hu**, this enchanting toolkit makes the numbers dance to your tune. No more grunt work, just sparkling invoices popping out like rabbits from a magician's hat! 🐇💫

📦 Installation
--------------

[](#-installation)

To install the package, run the following command in your Laravel project:

```
composer require composite/invoice-wrapper
```

Publish the configuration file with:

```
php artisan vendor:publish --provider="Composite\InvoiceWrapper\InvoiceWrapperServiceProvider"
```

⚙️ Configuration
----------------

[](#️-configuration)

After publishing the config file, you should set your environment variables in your .env file:

```
INVOICING_PROVIDER=billingo

# Billingo Configuration
BILLINGO_BASE_URL=https://api.billingo.hu/v3/
BILLINGO_API_KEY=your-billingo-api-key
BILLINGO_BLOCK_ID=your-billingo-block-id
BILLINGO_WAYBILL_BLOCK_ID=your-billingo-waybill-block-id

# Szamlazz.hu Configuration
SZAMLAZZHU_API_KEY=your-szamlazzhu-api-key
```

Make sure to replace your-billingo-api-key, your-billingo-block-id, and your-szamlazzhu-api-key with your actual API keys and configuration details.

🛠 Usage
-------

[](#-usage)

To issue an invoice, you can use the InvoiceWrapper facade with the desired invoice payload. Here's an example:

```
use Composite\InvoiceWrapper\Facades\InvoiceWrapper;
use Carbon\Carbon;

$invoicePayload = [
    // Your invoice payload here
];

// Issue the invoice using the selected provider
$invoice = InvoiceWrapper::issueInvoice($invoicePayload);
```

or without Facade, as a service (it can be useful, when you want to use multiple providers):

```
use Composite\InvoiceWrapper\InvoiceWrapper;
use Carbon\Carbon;

$config = [
    'selected_provider' => env('INVOICING_PROVIDER'),
    'providers' => [
        'billingo' => [
            'name' => 'Billingo',
            'base_url' => env('BILLINGO_BASE_URL', 'https://api.billingo.hu/v3/'),
            'api_key' => env('BILLINGO_API_KEY'),
            'block_id' => env('BILLINGO_BLOCK_ID', 0),
            'waybill_block_id' => env('BILLINGO_WAYBILL_BLOCK_ID', 0),
        ],
        'szamlazzhu' => [
            'name' => 'Szamlazz.hu',
            'api_key' => env('SZAMLAZZHU_API_KEY'),
            'proforma_prefix'=>env('SZAMLAZZHU_PROFORMA_PREFIX','ORDER'),
        ]
    ],
];

$invoicePayload = [
    // Your invoice payload here
];

// Issue the invoice using the selected provider
$invoiceWrapper = new InvoiceWrapper(
 \Composite\InvoiceWrapper\Factories\InvoiceGatewayFactory::create($config)
);

$invoiceWrapper->issueInvoice($invoicePayload);
```

Sample invoice payload:

```
$invoicePayload = [
    'partner' => [
        'id' => null, // for billingo required
        'name' => 'Test Partner',
        'address' => [
            'country_code' => 'HU',
            'post_code' => '1111',
            'city' => 'Budapest',
            'address' => 'Test utca 1.',
        ],
        'tax_type' => 'NO_TAX_NUMBER', //"HAS_TAX_NUMBER" : "NO_TAX_NUMBER",
        'taxcode' => 'HU29168950',
        'email' => 'btamba@composite.hu', // if email sending is true it is required
        'send_email' => true,
    ],
    'invoice' => [
        // 'type' => 'invoice', // not handled yet
        'fulfillment_date' => Carbon::now()->format('Y-m-d'),
        'due_date' => Carbon::now()->format('Y-m-d'),
        'payment_method' => 'bankcard', //'bankcard','cash','wire_transfer','cash_on_delivery','paypal','szep_card',
        'language' => 'hu', // 'hu', 'en'
        'currency' => 'HUF', // 'HUF', 'EUR'
        'paid' => false,
        'items' => [
            [
                'name' => 'Test product',
                'unit_price' => 1000,
                'unit_price_type' => 'net', // net, gross
                'quantity' => 1,
                'unit' => 'db',
                'vat' => '5', // '0%','5%','18%','27%','27%'
            ],
            [
                'name' => 'Test product 2',
                'unit_price' => 2000,
                'unit_price_type' => 'gross', // net, gross
                'quantity' => 1,
                'unit' => 'db',
                'vat' => '27', // '0%','5%','18%','27%','27%'
            ],
            [
                'name' => 'Test product 3',
                'unit_price' => 2000,
                'unit_price_type' => 'net', // net, gross
                'quantity' => 2,
                'unit' => 'db',
                'vat' => '27', // '0%','5%','18%','27%','27%'
            ]
        ],
        // 'conversion_rate' => 1, // Not handled yet
        'comment' => 'It is a comment',
    ],
];
```

To retrieve an invoice:

```
$invoiceId = 'invoice-id-here';
$invoice = InvoiceWrapper::getInvoice($invoiceId);
```

To download an invoice:

```
$invoiceId = 'invoice-id-here';
$invoice = InvoiceWrapper::downloadInvoice($invoiceId);
```

Make sure to handle any exceptions that may be thrown due to API errors or configuration issues.

📝✨To-Do List for Future Enhancements
------------------------------------

[](#to-do-list-for-future-enhancements)

Here's a whimsical checklist of tasks for the Invoice Wrapper's journey ahead:

- 🧙‍️ Creating the Invoice Wrapper - Done!
- 🧞‍ Implementing Szamlazz.hu Service - Done!
- 🧞‍ Implementing Billingo Service - "The Genie is out of the bottle!"
- 📩 Downloading Invoice - Awaiting the magic spell!
- 🔗 Getting Download Links - Soon to be summoned from the digital ether!

🤝 Support
---------

[](#-support)

For issues, questions, and contributions, please use the GitHub issues section of this repository.

🌟 Credits
---------

[](#-credits)

This package is proudly brought to you by:

- 🏢 [Composite Solutions](https://github.com/Composite-Solutions) - For innovative solutions and dedicated support.
- 👨‍💻 [Bence Tamba](https://github.com/tambabence) - The mastermind behind the code magic.

A huge shout-out to all contributors and supporters! Your feedback and contributions make this project better every day. 🚀🙌

Thank you for being part of this journey! 🎉👏

📜 Changelog
-----------

[](#-changelog)

All notable changes to this project will be documented in the [CHANGELOG.md](CHANGELOG.md) file.

📜 License
---------

[](#-license)

This package is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).

config/logging.php
------------------

[](#configloggingphp)

```
        'szamlazzhu' => [
            'driver' => 'daily',
            'path' => storage_path('logs/szamlazzhu.log'),
            'level' => env('LOG_LEVEL', 'debug'),
            'days' => env('LOG_DAILY_DAYS', 14),
            'replace_placeholders' => true,
        ],

```

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance44

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 63.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~79 days

Recently: every ~118 days

Total

7

Last Release

436d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5f258a8fedef0859edd89244d1f353181175ea84a17858f890af75dd2fc67014?d=identicon)[Composite Solutions](/maintainers/Composite%20Solutions)

---

Top Contributors

[![tambabence](https://avatars.githubusercontent.com/u/62600640?v=4)](https://github.com/tambabence "tambabence (19 commits)")[![BaluComposite](https://avatars.githubusercontent.com/u/171545466?v=4)](https://github.com/BaluComposite "BaluComposite (6 commits)")[![j14v](https://avatars.githubusercontent.com/u/8033928?v=4)](https://github.com/j14v "j14v (3 commits)")[![KaracsonyMarton](https://avatars.githubusercontent.com/u/41687291?v=4)](https://github.com/KaracsonyMarton "KaracsonyMarton (2 commits)")

### Embed Badge

![Health badge](/badges/composite-invoice-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/composite-invoice-wrapper/health.svg)](https://phpackages.com/packages/composite-invoice-wrapper)
```

###  Alternatives

[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[stechstudio/laravel-zipstream

A fast and simple streaming zip file downloader for Laravel.

4633.7M3](/packages/stechstudio-laravel-zipstream)[laravel-notification-channels/microsoft-teams

A Laravel Notification Channel for Microsoft Teams

1603.0M7](/packages/laravel-notification-channels-microsoft-teams)[spatie/laravel-export

Create a static site bundle from a Laravel app

646127.9k5](/packages/spatie-laravel-export)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
