- How do I install datomatic/laravel-fatture-in-cloud?
- Install it with Composer using composer require datomatic/laravel-fatture-in-cloud. Then publish the package config and add your Fatture in Cloud OAuth2 app credentials and tokens. The package registers a service provider and facade so you can start calling resources like invoices and clients from Laravel.
- Does this package support Laravel 11 and Laravel 12?
- Check the package composer.json for the exact Laravel and PHP version constraints before committing. The wrapper targets modern Laravel, but support for the newest major versions depends on the maintainer's release cadence. If your baseline is Laravel 11 or 12 on PHP 8.2+, confirm compatibility or be prepared to patch a fork.
- How does authentication work with the Fatture in Cloud API v2?
- Fatture in Cloud uses OAuth2, so you need a client ID, client secret, and per-account access and refresh tokens. This package gives you Laravel configuration for credentials, but you should verify whether it owns the full authorize, refresh, and revoke lifecycle or only consumes bearer tokens. For production, store tokens encrypted and implement refresh-and-retry on 401 if the package does not.
- Can I use it in a multi-tenant SaaS with multiple Fatture in Cloud accounts?
- Yes in principle, but the critical question is per-tenant credential resolution. Many wrappers default to a single global env config, which is not enough when each customer has their own Fatture in Cloud account. Verify that you can resolve tokens per tenant, or keep the package behind your own gateway that injects the right credentials.
- Does it return typed DTOs or raw arrays?
- Expect resource methods to return array payloads or lightly typed responses rather than a full domain model. That is fine for a transport wrapper, but it means you should write defensive mapping in your own adapter. Check the package source and tests to confirm the response contract and how stable it is across minor versions.
- How are Fatture in Cloud validation errors and SdI rejections surfaced?
- The package should surface API errors, but confirm whether FIC validation messages and SdI rejection reasons are passed through verbatim or flattened into generic exceptions. Verbatim errors make reconciliation and user remediation much easier. If they are flattened, log the raw response and map errors in your own InvoiceGateway layer.
- Does it handle rate limits and retries automatically?
- A thin community wrapper often leaves 429 and transient 5xx handling to the application. Check for built-in retry with backoff before relying on it for batch invoice creation. If it is missing, add retry and idempotency safeguards at your adapter layer, especially for document creation.
- Can I create invoices and retrieve PDFs or e-invoice XML?
- The package is oriented around Fatture in Cloud API v2 resources such as invoices, clients, and products, so JSON invoice CRUD is the baseline. Confirm whether document upload, PDF retrieval, and e-invoice XML endpoints are first-class methods or require raw API calls. For Italian e-invoicing, keep SdI lifecycle logic in your domain, not in the wrapper.
- Is datomatic/laravel-fatture-in-cloud production-ready?
- It is a small, MIT-licensed community package with a low star count, so the main risk is longevity rather than basic functionality. Treat it as a transport accelerator and isolate it behind your own interface so you can fork or replace it. Budget for maintenance and verify test coverage, issue response history, and Composer version constraints before production.
- How do I test the package without touching production Fatture in Cloud data?
- Use the Fatture in Cloud sandbox or test company environment and point your credentials there first. Laravel's HTTP fake or the package's mocking approach can support contract tests for request and response shapes. Confirm testability before committing, and never run creation tests against live invoicing data.