dystcz/fakturoid
Fakturoid for Laravel
Simple wrapper for official php package https://github.com/fakturoid/fakturoid-php
Docs
Installation
Step 1: Install package
Add the package in your composer.json by executing the command.
composer require dystcz/fakturoid
This will both update composer.json and install the package into the vendor/ directory.
Step 2: Configuration
First initialise the config file by running this command:
php artisan vendor:publish
With this command, initialize the configuration and modify the created file, located under config/fakturoid.php.
Configuration
return [
'client_id' => env('FAKTUROID_CLIENT_ID', 'XXX'),
'client_secret' => env('FAKTUROID_CLIENT_SECRET', 'XXX'),
'account_slug' => env('FAKTUROID_ACCOUNT_SLUG'),
'user_agent' => env('FAKTUROID_USER_AGENT', 'Application <your@email.cz>'),
];
Examples
Create Subject, Create Invoice, Send Invoice
use Dystcz\Fakturoid\Facades\Fakturoid;
try {
// create subject
$response = Fakturoid::getSubjectsProvider()->create([
'name' => 'Firma s.r.o.',
'email' => 'aloha@pokus.cz'
]);
if ($subject = $response->getBody()) {
// Create invoice with lines
$lines = [
[
'name' => 'Big sale',
'quantity' => 1,
'unit_price' => 1000
],
];
$invoiceProvider = Fakturoid::getInvoicesProvider();
$response = Fakturoid::getInvoicesProvider()->create([
'subject_id' => $subject->id,
'lines' => $lines
]);
$invoice = $response->getBody();
// Send created invoice
$invoiceProvider->fireAction($invoice->id, 'deliver');
}
} catch (\Exception $e) {
dd($e->getCode() . ": " . $e->getMessage());
}
More examples
For more examples, please visit the Fakturoid documentation.
Credits
- Fakturoid s.r.o. fakturoid-php for the underlying package.
License
Copyright (c) 2019 - 2025 dyst digital s.r.o MIT Licensed.
Related Packages
Cloud native, API first Laravel eCommerce package with integrated AI for ultra-f...
Package set to provide shop or e-commerce functionality (such as CART, ORDERS, T...
A Laravel package for integrating the Viva Payments gateway
Laravel 5 wrapper for the Woocommerce REST API
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 3.1.0 | ^8.2 | ^11.0| | MIT | |
| 3.0.1 | ^8.2 | ^11.0 | MIT | |
| 3.00 | ^8.2 | ^11.0 | MIT | |
| 2.0.0 | ^8.2 | ^11.0 | MIT | |
| 1.4 | >=7.3.0 | ^10.0 | MIT | |
| 1.3 | >=7.3.0 | ^7.0| | MIT | |
| 1.2 | >=7.2.0 | ^7.0 | MIT | |
| v1.1 | >=5.6.0 | 5.* | MIT | |
| v1.0 | >=5.6.0 | 5.* | MIT |