PHPackages                             ag84ark/smartbill - 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. ag84ark/smartbill

ActiveLibrary[Payment Processing](/categories/payments)

ag84ark/smartbill
=================

SmartBill.ro API wrapper compatible for Laravel

v1.1.4(2y ago)220MITPHPPHP ^7.4|^8.0|^8.1

Since Jan 23Pushed 2y agoCompare

[ Source](https://github.com/ag84ark/smartbill)[ Packagist](https://packagist.org/packages/ag84ark/smartbill)[ Docs](https://github.com/ag84ark/smartbill)[ RSS](/packages/ag84ark-smartbill/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (5)Versions (7)Used By (0)

SmartBill.ro Service Provider
=============================

[](#smartbillro-service-provider)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d7f9bd65c709c3af13f7f438db6f116ef7f3795b327834f7e92c46513c94da36/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6167383461726b2f736d61727462696c6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ag84ark/smartbill)[![Total Downloads](https://camo.githubusercontent.com/ce9426e15f025d030a5c41f4f211bdbd81ac6567e43de4b1c88460b362474f09/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6167383461726b2f736d61727462696c6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ag84ark/smartbill)

SmartBill.ro API integration for Laravel.
This started as a fork of from [necenzurat/smartbill](https://github.com/necenzurat/smartbill), and now it's a standalone package.

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

[](#installation)

You can install the package via composer:

```
composer require ag84ark/smartbill
```

You can publish the config file with:

```
php artisan vendor:publish --provider="Ag84ark\SmartBill\SmartBillServiceProvider" --tag="laravel-smartbill-config"
```

Documentation
-------------

[](#documentation)

In the making

Usage
-----

[](#usage)

### Invoice

[](#invoice)

### Using resources

[](#using-resources)

```
use Ag84ark\SmartBill\SmartBill;
use Ag84ark\SmartBill\Resources\Invoice;
use Ag84ark\SmartBill\Resources\Client;
use Ag84ark\SmartBill\Resources\InvoiceProduct;

$invoice = Invoice::make();
$invoice->setIsDraft(true);

$invoice->setClient(
  Client::make()
    ->setName("ACME CO")
    ->setVatCode("RO12345678")
    ->setRegCom("")
    ->setAddress("Main street, no 10")
    ->setIsTaxPayer(false)
    ->setCity("Bucharest")
    ->setCounty("Bucharest")
    ->setCountry("Romania")
    ->setEmail("acme@example.com")
);

$invoice->addProduct(
  InvoiceProduct::make()
    ->setName("Produs 1")
    ->setCode("ccd1")
    ->setMeasuringUnitName("buc")
    ->setCurrency("RON")
    ->setQuantity(2)
    ->setPrice(10)
    ->setIsTaxIncluded(true)
    ->setTaxName("Redusa")
    ->setTaxPercentage(9)
);

$invoice->addProduct(InvoiceProduct::makeValoricDiscountItem("Discount", 5));

$invoice->setPayment(
  InvoicePayment::make()
    ->setIsCash(true)
    ->setType(Ag84ark\SmartBill\Enums\PaymentType::OrdinPlata)
    ->setValue(15)
);

echo 'Emitere factura simpla: ';
try {
    $smartbill = new SmartBill();
    $output = $smartbill->invoiceEndpoint->createInvoice($invoice);
    $invoiceNumber = $output->getNumber();
    $invoiceSeries = $output->getSeries();
    echo $invoiceSeries . $invoiceNumber;
} catch (\Exception $ex) {
    echo $ex->getMessage();
}
```

### Using array data

[](#using-array-data)

```
$invoice = [
    'companyVatCode' => config('smartbill.vatCode'),
    'client' 		=> [
        'name' 			=> "ACME CO",
        'vatCode' 		=> "RO12345678",
        'regCom' 		=> "",
        'address' 		=> "Main street, no 10",
        'isTaxPayer' 	=> false,
        'city' 			=> "Bucharest",
        'country' 		=> "Romania",
        'email' 		=> "acme@example.com",
    ],
    'issueDate'      => date('Y-m-d'),
    'seriesName'     => config('smartbill.invoiceSeries'),
    'isDraft'        => false,
    'dueDate'		=> date('Y-m-d', time() + 3600 * 24 * 30),
    'mentions'		=> '',
    'observations'   => '',
    'deliveryDate'   => date('Y-m-d', time() + 3600 * 24 * 10),
    'precision'      => 2,
    'products'		=> [
        [
            'name' 				=> "Produs 1",
            'code' 				=> "ccd1",
            'isDiscount' 		=> false,
            'measuringUnitName' => "buc",
            'currency' 			=> "RON",
            'quantity' 			=> 2,
            'price' 			=> 10,
            'isTaxIncluded' 	=> true,
            'taxName' 			=> "Redusa",
            'taxPercentage' 	=> 9,
            'isService'         => false,
            'saveToDb'          => false,
        ],
    ],
];

echo 'Emitere factura simpla: ';
try {
    $smartbill = new SmartBill();
    $output = $smartbill->invoiceEndpoint->createInvoiceFromArray($invoice);
    $invoiceNumber = $output->getNumber();
    $invoiceSeries = $output->getSeries();
    echo $invoiceSeries . $invoiceNumber;
} catch (\Exception $ex) {
    echo $ex->getMessage();
}
```

### Testing

[](#testing)

```
Partially tested
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, use the issue tracker.

License
-------

[](#license)

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

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~3 days

Total

6

Last Release

830d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c72594d986466b7fb5bbfd565151341409107112b5cc71fdc2b3fe2f0c2389df?d=identicon)[ag84ark](/maintainers/ag84ark)

---

Top Contributors

[![necenzurat](https://avatars.githubusercontent.com/u/145449?v=4)](https://github.com/necenzurat "necenzurat (28 commits)")[![ag84ark](https://avatars.githubusercontent.com/u/10678506?v=4)](https://github.com/ag84ark "ag84ark (25 commits)")[![AhsanShabbir](https://avatars.githubusercontent.com/u/13930306?v=4)](https://github.com/AhsanShabbir "AhsanShabbir (4 commits)")[![CosminBd](https://avatars.githubusercontent.com/u/37343923?v=4)](https://github.com/CosminBd "CosminBd (1 commits)")

---

Tags

laravelsmartbillinvoicesmartbill

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ag84ark-smartbill/health.svg)

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

###  Alternatives

[laraveldaily/laravel-invoices

Missing invoices for Laravel

1.5k1.3M4](/packages/laraveldaily-laravel-invoices)[necenzurat/smartbill

SmartBill API wrapper compatible for Laravel

148.9k](/packages/necenzurat-smartbill)[horstoeko/zugferd-laravel

A library for Laravel-Framework for creating and reading european electronic invoices

3693.6k2](/packages/horstoeko-zugferd-laravel)[omalizadeh/laravel-multi-payment

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

491.1k](/packages/omalizadeh-laravel-multi-payment)

PHPackages © 2026

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