New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

necenzurat/smartbill

SmartBill API wrapper compatible for Laravel
12,209 14
Install
composer require necenzurat/smartbill
Latest Version:1.1.5
PHP:^7.2.5|^8.0|^8.1|^8.2|^8.3|^8.4
Laravel:5 – 13
License:MIT
Last Updated:Mar 27, 2026
Links: GitHub  ·  Packagist
Maintainer: necenzurat

SmartBill.ro Service Provider

Latest Version on Packagist Total Downloads

Simple SmartBill API integration for Laravel.

Installation

Step 1. Install the package via Composer:

composer require necenzurat/smartbill

Step 2. Publish the config file:

php artisan vendor:publish --provider="Necenzurat\SmartBill\SmartBillServiceProvider" --tag="config"

Step 3. Enter your account details in the config/smartbill.php file (API username, key, VAT code etc.).

Usage

Click for usage


$invoice = [
    'companyVatCode' => config('smartbill.vatCode'),
    'client' 		=> [
        'name' 			=> "Intelligent IT",
        'vatCode' 		=> "RO12345678",
        'regCom' 		=> "",
        'address' 		=> "str. Sperantei, nr. 5",
        'isTaxPayer' 	=> false,
        'city' 			=> "Sibiu",
        'country' 		=> "Romania",
        'email' 		=> "office@intelligent.ro",
    ],
    '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->createInvoice($invoice); //see docs for response
    $invoiceNumber = $output['number'];
    $invoiceSeries = $output['series'];
    echo $invoiceSeries . $invoiceNumber;
} catch (\Exception $ex) {
    echo $ex->getMessage();
}

see the SmartBill demo app examples: https://api.smartbill.ro/extension-files/aplicatie_demo_php.zip

Testing

hell no

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email necenzurat@gmail.com instead of using the issue tracker.

Credits

License

The WTFPL. Please see License File for more information.

Related Packages

andreilungeanu/smartbill

A Laravel package for the Smartbill API.

2,225 1
laraveldaily/laravel-invoices

Missing invoices for Laravel

1,736,080 1,549
saasykit/laravel-invoices

Generate PDF invoices in Laravel

175,814 7
purpleobject/factuursturen-laravel

Easy connection with the factuursturen.nl API

26 1
otisz/laravel-billingo

Billingo REST API integration for Laravel

1,430 3

Version History

Version Released PHP Laravel License
1.1.5 ^7.2.5|^8.0|^8.1|^8.2|^8.3|^8.4 ^5.8|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0|^13.0 MIT
1.1.4 ^7.2.5|^8.0|^8.1|^8.2|^8.3|^8.4 ^5.8|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0 MIT
1.1.3 ^7.2.5|^8.0|^8.1|^8.2 ~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^12.0 MIT
1.1.2 ^7.2.5|^8.0|^8.1|^8.2 ~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0 MIT
1.1.1 ^7.2.5|^8.0|^8.1 ~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0 MIT