New

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

datomatic/laravel-fatture-in-cloud

Laravel wrapper for Fatture in Cloud API v2
23,437 10
Install
composer require datomatic/laravel-fatture-in-cloud
Latest Version:v1.7.1
PHP:^8.1
Laravel:8 – 13
License:MIT
Last Updated:Mar 17, 2026
Links: GitHub  ·  Packagist
Maintainer: trippo

Laravel-Fatture-in-Cloud-DarkLaravel-Fatture-in-Cloud-Light

Laravel wrapper for Fatture in Cloud API v2

Latest Version on Packagist GitHub Code Style Action Status Total Downloads


This Laravel wrapper allows you to integrate Fatture in Cloud using Api v2.

Requirements

  • Laravel >= 8.37
  • PHP >= 8.1
  • ext-json

Installation

You can install the package via composer:

composer require datomatic/laravel-fatture-in-cloud

Optionally, you can publish the config file with:

php artisan vendor:publish --provider="Datomatic\FattureInCloud\FattureInCloudServiceProvider" --tag="fatture-in-cloud-config"

This is the contents of the published config file:

return [
    'access_token'  => env('FATTURE_IN_CLOUD_ACCESS_TOKEN'),
    'company_id'  => env('FATTURE_IN_CLOUD_COMPANY_ID'),
    'endpoint' => env('FATTURE_IN_CLOUD_ENDPOINT','https://api-v2.fattureincloud.it/'),
];

PS: to obtain company_id please see this article.

Usage

Get FattureInCloud class from service container or using FattureInCloud Facade.

use Datomatic\FattureInCloud\Facades\FattureInCloud;
//Facade
FattureInCloud::invoices()->...

use Datomatic\FattureInCloud\FattureInCloud;

//Automatic Injection
public function __construct(FattureInCloud $fic){}

//Resolve
$fic = App::make(FattureInCloud::class);
$fic = app(Datomatic\FattureInCloud\FattureInCloud::class);

Use the Fatture In Cloud utilities classes

$fic->clients()->create([... user array...]);

Please see the functionalities and the array to pass on Official Documentation.

The resources covered are:

  • user()
  • info()
  • products()
  • clients()
  • suppliers()
  • invoices()
  • quotes()
  • proformas()
  • receipts()
  • deliveryNotes()
  • creditNotes()
  • orders()
  • selfOwnInvoices()
  • selfSupplierInvoices()
  • invoices()
  • work_reports()
  • supplierOrders()
  • expenses()
  • passiveCreditNotes()
  • passiveDeliveryNotes()
  • paymentAccounts()
  • paymentMethods()

Each resource has the same methods available:

  • all(array $data = [])
  • create(array $data)
  • edit(int $id, array $data)
  • delete(int $id, array $data = [])
  • getById(int $id, array $data = [])

The methods will return an array with the response from Fatture in Cloud API (except for the delete method that may return null).

For example, to fetch all clients (according to Official Documentation) you should call:

$fic->clients()->all(['fieldset' => 'detailed'])

Enums

To improve the use of api usage is included a comfortable list of utilities enums:

  • DocumentStatus
  • EntityType
  • IssuedDocumentType
  • ReceivedDocumentType
  • PaymentStatus

Utilities

The Fatture in CLoud API accept only a fullname on country field 🤦‍♂️ so i add a Datomatic\FattureInCloud\Utilities\CountryConverter utility class with fromAlpha2 and fromName methods.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

Related Packages

datomatic/laravel-enum-collections

A package to save a collection of Enums in a Eloquent field and interact with hi...

4,440 8
datomatic/laravel-carta-del-docente

Laravel PHP Soap wrapper of Carta del Docente

2,891 5
datomatic/laravel-enum-state-machine

A simple state machine for enums in Laravel

1,907 3
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

648,266,899 9,701
laravel/framework

The Laravel Framework.

604,216,237 34,982

Version History

Version Released PHP Laravel License
v1.7.1 ^8.1 ^8.37||^9.0|^10.0|^11.0|^12.0|^13.0 MIT
v1.7.0 ^8.1 ^8.37||^9.0|^10.0|^11.0|^12.0 MIT
v1.6.0 ^8.1 ^8.37||^9.0|^10.0|^11.0|^12.0 MIT
v1.5.0 ^8.1 ^8.37||^9.0|^10.0|^11.0 MIT
v1.4.1 ^8.1 ^8.37||^9.0|^10.0|^11.0 MIT