Download the PHP package facturapi/facturapi-php without Composer
On this page you can find all versions of the php package facturapi/facturapi-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package facturapi-php
Facturapi PHP SDK
Official PHP SDK for Facturapi.
Language: English | Español
Installation ⚡
Without Composer (supported workaround):
Requirements:
- PHP
>=8.2
Backward Compatibility With Older PHP Versions
Since version 4.0.0, the SDK requires PHP >= 8.2.
- If your project already runs on PHP 8.2+, no extra changes are needed.
- If your project runs on PHP 8.1 or lower, pin to version 3.7.0 (latest compatible release before PHP 8.2 requirement).
Quick Start 🚀
Client Configuration ⚙️
Constructor signature:
Supported config keys:
apiVersion(string, default:v2)timeout(int|float, default:360seconds)httpClient(Psr\Http\Client\ClientInterface, advanced)
Example:
Custom HTTP Client (Advanced)
The SDK works out of the box with its internal Guzzle-based client.
If you provide httpClient, pass any PSR-18 compatible client and configure its timeout values in that client:
Common Usage 🧾
Create a Product
Create an Invoice
Download Files
downloadPdf() returns raw PDF bytes (binary string), not base64.
Send by Email
Comercio Exterior Catalogs
Organizations: Set Default Series
Error Handling ⚠️
On non-2xx responses, the SDK throws Facturapi\Exceptions\FacturapiException.
The exception includes:
getMessage(): API error message when present.getStatusCode(): HTTP status code.getErrorData(): decoded JSON error payload (full API shape).getRawBody(): raw response body string.
Migration Notes (v4) 🔄
- Minimum PHP version is now
>=8.2. - Removed support for the positional
apiVersionconstructor argument. - Composer projects: no loader changes needed; keep using
vendor/autoload.php. - Non-Composer projects can keep using the SDK by loading
src/Facturapi.phpdirectly. - Snake_case method aliases are deprecated in v4 and will be removed in v5.
Facturapi\\Exceptions\\Facturapi_Exceptionis deprecated in v4 and will be removed in v5.- Use
Facturapi\\Exceptions\\FacturapiException.
Documentation 📚
Full docs: https://docs.facturapi.io
Support 💬
- Issues: open a GitHub issue
- Email:
[email protected]