PHPackages                             netipar/szamlazzhu - 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. [Payment Processing](/categories/payments)
4. /
5. netipar/szamlazzhu

ActiveLibrary[Payment Processing](/categories/payments)

netipar/szamlazzhu
==================

Modern Laravel package for the szamlazz.hu invoicing API

v1.0.2(3mo ago)1854↑850%MITPHPPHP ^8.2CI passing

Since Feb 10Pushed 3mo agoCompare

[ Source](https://github.com/NETipar/szamlazzhu)[ Packagist](https://packagist.org/packages/netipar/szamlazzhu)[ RSS](/packages/netipar-szamlazzhu/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (6)Versions (4)Used By (0)

  ![laravel-szamlazzhu](art/banner.svg)Szamlazz.hu for Laravel
=======================

[](#szamlazzhu-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4f5a51eaa3f30986665ae2e7c1a2266b8777263fee8f1df4148cfabaecc7fb4b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6574697061722f737a616d6c617a7a68752e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/netipar/szamlazzhu)[![Tests](https://camo.githubusercontent.com/cbbc01000ab0200ab64cc1663c98202a2d7a789e3422272fe8312fb87c4bf128/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f4e4554697061722f737a616d6c617a7a68752f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/NETipar/szamlazzhu/actions?query=workflow%3ATests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/2752fdf0973477bf5e1c250379dd09b260d9098a562a92130aa9df01aa6f2e2c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e6574697061722f737a616d6c617a7a68752e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/netipar/szamlazzhu)

Modern Laravel package for the [szamlazz.hu](https://www.szamlazz.hu) invoicing API. Generate invoices, receipts, proforma invoices, delivery notes, query invoice data, download PDFs, and more.

Based on the official [szamlazz.hu PHP SDK](https://docs.szamlazz.hu/hu/php/changelog#21023---20251126) v2.10.23, rebuilt for Laravel with modern PHP 8.1+ features.

Quick Example
-------------

[](#quick-example)

```
use NETipar\Szamlazzhu\Client;
use NETipar\Szamlazzhu\Document\Invoice;
use NETipar\Szamlazzhu\Entity\Buyer;
use NETipar\Szamlazzhu\Enums\PaymentMethod;
use NETipar\Szamlazzhu\Item\InvoiceItem;

$client = app(Client::class);

$invoice = new Invoice();
$invoice->getHeader()->setPaymentMethod(PaymentMethod::BankTransfer);

$invoice->setBuyer(new Buyer(
    name: 'Customer Kft.',
    zipCode: '1234',
    city: 'Budapest',
    address: 'Main Street 1.',
));

$item = new InvoiceItem();
$item->setName('Product name')
    ->setNetUnitPrice(10000.0)
    ->setQuantity(2.0)
    ->setVat('27')
    ->setNetPrice(20000.0)
    ->setVatAmount(5400.0)
    ->setGrossAmount(25400.0);
$invoice->addItem($item);

$result = $client->generateInvoice($invoice);

$result->isSuccess();         // true
$result->getDocumentNumber(); // 'E-PREFIX-2026-001'
$result->getPdfFile();        // PDF binary string
```

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 10, 11, or 12
- A [szamlazz.hu](https://www.szamlazz.hu) account with API key

Installation
------------

[](#installation)

```
composer require netipar/szamlazzhu
```

Publish the config file:

```
php artisan vendor:publish --tag=szamlazzhu-config
```

Add your API key to `.env`:

```
SZAMLAZZHU_API_KEY=your-agent-key

```

Usage
-----

[](#usage)

### Obtaining the Client

[](#obtaining-the-client)

Always obtain the `Client` via dependency injection or the service container:

```
use NETipar\Szamlazzhu\Client;

// Dependency injection (preferred)
public function handle(Client $client): void
{
    $result = $client->generateInvoice($invoice);
}

// Or via service container
$client = app(Client::class);
```

### Generate an Invoice

[](#generate-an-invoice)

```
use NETipar\Szamlazzhu\Client;
use NETipar\Szamlazzhu\Document\Invoice;
use NETipar\Szamlazzhu\Entity\Buyer;
use NETipar\Szamlazzhu\Entity\Seller;
use NETipar\Szamlazzhu\Enums\Currency;
use NETipar\Szamlazzhu\Enums\Language;
use NETipar\Szamlazzhu\Enums\PaymentMethod;
use NETipar\Szamlazzhu\Item\InvoiceItem;

$invoice = new Invoice();

$header = $invoice->getHeader();
$header->setIssueDate(now()->format('Y-m-d'));
$header->setFulfillment(now()->format('Y-m-d'));
$header->setPaymentDue(now()->addDays(8)->format('Y-m-d'));
$header->setPaymentMethod(PaymentMethod::BankTransfer);
$header->setCurrency(Currency::HUF);
$header->setLanguage(Language::Hungarian);
$header->setComment('Invoice comment');

$invoice->setSeller(new Seller(
    bankName: 'OTP Bank',
    bankAccountNumber: '11111111-22222222-33333333',
));

$invoice->setBuyer(new Buyer(
    name: 'Customer Kft.',
    zipCode: '1234',
    city: 'Budapest',
    address: 'Main Street 1.',
    taxNumber: '12345678-1-42',
    email: 'customer@example.com',
));

$item = new InvoiceItem();
$item->setName('Product name')
    ->setNetUnitPrice(10000.0)
    ->setQuantity(2.0)
    ->setQuantityUnit('db')
    ->setVat('27')
    ->setNetPrice(20000.0)
    ->setVatAmount(5400.0)
    ->setGrossAmount(25400.0);
$invoice->addItem($item);

$result = $client->generateInvoice($invoice);

$result->isSuccess();         // bool
$result->getDocumentNumber(); // e.g. 'E-PREFIX-2026-001'
$result->getPdfFile();        // PDF binary string or null
```

### Generate a Receipt

[](#generate-a-receipt)

```
use NETipar\Szamlazzhu\Document\Receipt;
use NETipar\Szamlazzhu\Entity\Buyer;
use NETipar\Szamlazzhu\Enums\Currency;
use NETipar\Szamlazzhu\Enums\PaymentMethod;
use NETipar\Szamlazzhu\Item\ReceiptItem;

$receipt = new Receipt();
$receipt->getHeader()->setPrefix('NYGTA');
$receipt->getHeader()->setPaymentMethod(PaymentMethod::Cash);
$receipt->getHeader()->setCurrency(Currency::HUF);

$receipt->setBuyer(new Buyer(name: 'Customer Name'));

$item = new ReceiptItem();
$item->setName('Item name')
    ->setNetUnitPrice(10000.0)
    ->setQuantity(1.0)
    ->setQuantityUnit('db')
    ->setVat('27')
    ->setNetPrice(10000.0)
    ->setVatAmount(2700.0)
    ->setGrossAmount(12700.0);
$receipt->addItem($item);

$result = $client->generateReceipt($receipt);
```

### Generate a Proforma Invoice

[](#generate-a-proforma-invoice)

```
use NETipar\Szamlazzhu\Document\Proforma;

$proforma = new Proforma();
// Same structure as Invoice: getHeader(), setSeller(), setBuyer(), addItem()
$result = $client->generateProforma($proforma);
```

### Generate a Delivery Note

[](#generate-a-delivery-note)

```
use NETipar\Szamlazzhu\Document\DeliveryNote;

$note = new DeliveryNote();
// Same structure as Invoice: getHeader(), setSeller(), setBuyer(), addItem()
$result = $client->generateDeliveryNote($note);
```

### Reverse (Storno) an Invoice

[](#reverse-storno-an-invoice)

```
use NETipar\Szamlazzhu\Document\ReverseInvoice;

$invoice = new ReverseInvoice();
$invoice->getHeader()->setInvoiceNumber('E-PREFIX-2026-001');

$result = $client->generateReverseInvoice($invoice);
```

### Reverse (Storno) a Receipt

[](#reverse-storno-a-receipt)

```
use NETipar\Szamlazzhu\Document\ReverseReceipt;

$receipt = new ReverseReceipt();
$receipt->getHeader()->setReceiptNumber('NYGTA-2026-1');

$result = $client->generateReverseReceipt($receipt);
```

### Record a Payment

[](#record-a-payment)

```
use NETipar\Szamlazzhu\CreditNote\InvoiceCreditNote;
use NETipar\Szamlazzhu\Document\Invoice;

$invoice = new Invoice();
$invoice->getHeader()->setInvoiceNumber('E-PREFIX-2026-001');

$creditNote = new InvoiceCreditNote(
    date: now()->format('Y-m-d'),
    amount: 25400.0,
);
$invoice->addCreditNote($creditNote);

$result = $client->payInvoice($invoice);
```

### Query Invoice Data

[](#query-invoice-data)

```
use NETipar\Szamlazzhu\Enums\LookupType;

// By invoice number (default)
$result = $client->getInvoiceData('E-PREFIX-2026-001');

// By order number
$result = $client->getInvoiceData('ORD-123', LookupType::OrderNumber);

if ($result->isSuccess()) {
    $data = $result->toArray();
}
```

### Download Invoice PDF

[](#download-invoice-pdf)

```
use Illuminate\Support\Facades\Storage;

$result = $client->getInvoicePdf('E-PREFIX-2026-001');
$pdf = $result->toPdf();

if ($pdf) {
    Storage::put('invoices/E-PREFIX-2026-001.pdf', $pdf);
}
```

### Query Receipt Data

[](#query-receipt-data)

```
$result = $client->getReceiptData('NYGTA-2026-1');

if ($result->isSuccess()) {
    $data = $result->toArray();
}
```

### Download Receipt PDF

[](#download-receipt-pdf)

```
$result = $client->getReceiptPdf('NYGTA-2026-1');
$pdf = $result->toPdf();

if ($pdf) {
    Storage::put('receipts/NYGTA-2026-1.pdf', $pdf);
}
```

### Query Taxpayer Data

[](#query-taxpayer-data)

```
// Pass the first 8 digits of the tax number
$result = $client->getTaxPayer('12345678');

if ($result->isSuccess()) {
    $data = $result->toArray();
}
```

### Delete a Proforma Invoice

[](#delete-a-proforma-invoice)

```
use NETipar\Szamlazzhu\Enums\LookupType;

// By proforma number (default)
$result = $client->deleteProforma('D-PREFIX-2026-001');

// By order number
$result = $client->deleteProforma('REND-2026-001', LookupType::OrderNumber);
```

Document Types
--------------

[](#document-types)

ClassPurpose`Invoice`Standard invoice`PrePaymentInvoice`Pre-payment (advance) invoice`FinalInvoice`Final invoice`CorrectiveInvoice`Corrective invoice`ReverseInvoice`Reverse (storno) invoice`Receipt`Receipt`ReverseReceipt`Reverse (storno) receipt`Proforma`Proforma invoice`DeliveryNote`Delivery noteAll document classes live in `NETipar\Szamlazzhu\Document\`.

Enums
-----

[](#enums)

Always use enum cases instead of raw strings:

- **`PaymentMethod`** - `BankTransfer`, `Cash`, `CreditCard`, `Check`, `CashOnDelivery`, `PayPal`, `Szep`, `Otp`, `Compensation`, `Voucher`, `Barion`, `Other`
- **`Currency`** - `HUF`, `EUR`, `USD`, `GBP`, `CHF`, and 30+ ISO currencies
- **`Language`** - `Hungarian`, `English`, `German`, `Italian`, `Romanian`, `Slovak`, `Croatian`, `French`, `Spanish`, `Czech`, `Polish`
- **`VatRate`** - `Percent27`, `Percent5`, `Percent0`, `TAM`, `AAM`, `EU`, `EUK`, `MAA`, and more
- **`LookupType`** - `InvoiceNumber`, `OrderNumber`, `ExternalId`
- **`DocumentType`** - `Invoice`, `ReverseInvoice`, `CorrectiveInvoice`, `PrepaymentInvoice`, `FinalInvoice`, `Proforma`, `DeliveryNote`, `Receipt`, `ReverseReceipt`

Response Handling
-----------------

[](#response-handling)

Every Client method returns an `ApiResponse`:

```
$result->isSuccess();         // bool
$result->isFailed();          // bool
$result->getDocumentNumber(); // string|null
$result->getPdfFile();        // string|null (binary PDF)
$result->toPdf();             // string|null (alias)
$result->toArray();           // array|null
$result->toJson();            // string|null
$result->toXml();             // string|null
$result->getErrorMsg();       // string|null
$result->getErrorCode();      // int|null
```

Error Handling
--------------

[](#error-handling)

```
use NETipar\Szamlazzhu\Exceptions\SzamlazzhuException;
use NETipar\Szamlazzhu\Exceptions\ConnectionException;
use NETipar\Szamlazzhu\Exceptions\ResponseException;
use NETipar\Szamlazzhu\Exceptions\ValidationException;
use NETipar\Szamlazzhu\Exceptions\XmlBuildException;

try {
    $result = $client->generateInvoice($invoice);
} catch (ConnectionException $e) {
    // Network / connection error
} catch (ResponseException $e) {
    // API response error
} catch (ValidationException $e) {
    // Input validation error
} catch (XmlBuildException $e) {
    // XML generation error
} catch (SzamlazzhuException $e) {
    // Base exception (catches all above)
}
```

Entity Properties
-----------------

[](#entity-properties)

All entity, header, item, and document properties are **public** and can be read or written directly. Fluent setters are also available for chaining:

```
$buyer = new Buyer(
    name: 'Company Name',
    zipCode: '1234',
    city: 'Budapest',
    address: 'Street 1.',
);

// Direct property access
$buyer->taxNumber = '12345678-1-42';
$buyer->email = 'email@example.com';

// Or fluent setters (chainable)
$buyer->setPhoneNumber('+36201234567')->setComment('Note');
```

Configuration
-------------

[](#configuration)

Key `.env` variables:

```
SZAMLAZZHU_API_KEY=your-agent-key
SZAMLAZZHU_DOWNLOAD_PDF=true
SZAMLAZZHU_SAVE_PDF=true
SZAMLAZZHU_TIMEOUT=30
SZAMLAZZHU_SESSION_DRIVER=cache
SZAMLAZZHU_LOG_CHANNEL=null

```

The session driver supports `cache` (default), `file`, `database`, and `null` (for testing).

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [NETipar](https://netipar.hu)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance82

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

97d ago

PHP version history (2 changes)v1.0.0PHP ^8.1

v1.0.2PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/63ebd403a206ac48ef1923c8237326df547be3598c1e46ade9d244315ec25735?d=identicon)[NETipar](/maintainers/NETipar)

---

Top Contributors

[![hegedustibor](https://avatars.githubusercontent.com/u/6483104?v=4)](https://github.com/hegedustibor "hegedustibor (4 commits)")

---

Tags

invoicelaravelsdkszamlazzhularavelinvoicehungaryszamlazzszámlázás

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/netipar-szamlazzhu/health.svg)

```
[![Health](https://phpackages.com/badges/netipar-szamlazzhu/health.svg)](https://phpackages.com/packages/netipar-szamlazzhu)
```

###  Alternatives

[laraveldaily/laravel-invoices

Missing invoices for Laravel

1.5k1.3M4](/packages/laraveldaily-laravel-invoices)[omalizadeh/laravel-multi-payment

A driver-based laravel package for online payments via multiple gateways

491.1k](/packages/omalizadeh-laravel-multi-payment)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

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