Smart Bill
Description
Smart Bill integrates Laravel Enso with the SmartBill invoicing API.
The package stores integration settings, exposes the backoffice settings form, and provides action classes for issuing, downloading, and cancelling invoices through the remote API.
It is intended for commercial flows that need SmartBill as the fiscal invoice provider while keeping invoice payload composition inside Enso resources.
Installation
Install the package:
composer require laravel-enso/smart-bill
Run the package migrations:
php artisan migrate
Features
- Settings screen for base URL, auth token, username, VAT code, invoice series, and enablement.
- Action classes for invoice issue, download, and cancel flows.
- SmartBill endpoint wrappers separated from the invoice resource builders.
- Invoice resource mapping for clients and product rows.
Usage
Main route group:
integrations.smartBill.settings.*
Typical invoice issue flow:
use LaravelEnso\SmartBill\Actions\Invoice\Issue;
(new Issue($client, $address, $products, $data))->handle();
Settings validation requires remote credentials when the integration is enabled.
API
HTTP routes
GET api/integrations/smartBill/settingsPATCH api/integrations/smartBill/settings/{settings}
Invoice actions
LaravelEnso\\SmartBill\\Actions\\Invoice\\IssueLaravelEnso\\SmartBill\\Actions\\Invoice\\DownloadLaravelEnso\\SmartBill\\Actions\\Invoice\\Cancel
Behavior:
- builds SmartBill payloads through invoice resources
- calls dedicated API endpoints
- persists local invoice references for later retrieval
Depends On
Required Enso packages:
Companion frontend package: