invoicetronic/php-sdk
Composer 安装命令:
composer require invoicetronic/php-sdk
包简介
The [Invoicetronic API][2] is a RESTful service that allows you to send and receive invoices through the Italian [Servizio di Interscambio (SDI)][1], or Interchange Service. The API is designed to be simple and easy to use, abstracting away SDI complexity while providing complete control over the in
README 文档
README
The Invoicetronic API is a RESTful service that allows you to send and receive invoices through the Italian Servizio di Interscambio (SDI), or Interchange Service. The API is designed to be simple and easy to use, abstracting away SDI complexity while providing complete control over the invoice send/receive process. It provides advanced features as encryption at rest, multi-language pre-flight invoice validation, multiple upload formats, webhooks, event logging, client SDKs, and CLI tools.
For more information, see Invoicetronic website
Before you start
For the full integration guide, tutorials, SDKs and quickstarts, see the Documentation. A few cross-cutting topics worth knowing before integrating:
- Prerequisites — what you need to start in Sandbox and what's required to move to production.
- API Keys — how
ik_live_andik_test_keys select the environment. - Sandbox — free test environment that mirrors the live workflow, with no credits consumed.
- Rate Limiting — per-second, per-minute and per-day limits; how to handle
429 Too Many Requests. - Pagination —
pageandpage_sizeparameters and theInvoicetronic-Total-Countresponse header. - CORS — calling the API from the browser; allowed origins are configured per key.
- Webhooks — real-time event notifications with HMAC-SHA256 signature validation.
- Localization — use the
Accept-Languageheader to receive error messages in Italian, English or German.
For more information, please visit https://invoicetronic.com/en/contact/.
Installation & Usage
Requirements
PHP 7.4 and later. Should also work with PHP 8.0.
Composer
To install the bindings via Composer, run the following command:
$ composer require invoicetronic/php-sdk
Then run composer install
Manual Installation
There are three options:
- Download the latest release of the PHP SDK Phar Archive and simply include it in your project.
require_once('./invoicetronic-sdk.phar');
- Download our SDK using PHP-download and simply include it in your project.
- Create your own custom autoloader and download all the dependencies (transitive included) as explained here.
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: Basic
$config = Invoicetronic\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Invoicetronic\Api\CompanyApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$page = 1; // int | Page number.
$page_size = 100; // int | Items per page. Cannot be greater than 200.
$sort = 'sort_example'; // string | Sort by field. Prefix with '-' for descending order.
$q = 'q_example'; // string | Full-text search across committente, prestatore, identifier, and file name.
try {
$result = $apiInstance->companyGet($page, $page_size, $sort, $q);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CompanyApi->companyGet: ', $e->getMessage(), PHP_EOL;
}
API Endpoints
All URIs are relative to http://localhost
| Class | Method | HTTP request | Description |
|---|---|---|---|
| CompanyApi | companyGet | GET /company | List companies |
| CompanyApi | companyIdDelete | DELETE /company/{id} | Delete a company |
| CompanyApi | companyIdGet | GET /company/{id} | Get a company by id |
| CompanyApi | companyPost | POST /company | Add a company |
| CompanyApi | companyPut | PUT /company | Update a company |
| CompanyApi | companyVatGet | GET /company/{vat} | Get a company by vat number |
| ExportApi | exportGet | GET /export | Export invoices as a ZIP archive |
| HealthApi | healthGet | GET /health | Health check |
| LogApi | logGet | GET /log | List events |
| LogApi | logIdGet | GET /log/{id} | Get an event by id |
| ReceiveApi | receiveGet | GET /receive | List incoming invoices |
| ReceiveApi | receiveIdDelete | DELETE /receive/{id} | Delete an incoming invoice by id |
| ReceiveApi | receiveIdGet | GET /receive/{id} | Get an incoming invoice by id |
| ReceiveApi | receiveIdPayloadGet | GET /receive/{id}/payload | Get a receive invoice payload by id |
| SendApi | sendFilePost | POST /send/file | Add an invoice by file |
| SendApi | sendGet | GET /send | List invoices |
| SendApi | sendIdGet | GET /send/{id} | Get a invoice by id |
| SendApi | sendIdPayloadGet | GET /send/{id}/payload | Get a send invoice payload by id |
| SendApi | sendIdentifierGet | GET /send/{identifier} | Get a invoice by identifier |
| SendApi | sendJsonPost | POST /send/json | Add an invoice by json |
| SendApi | sendPost | POST /send | Add an invoice |
| SendApi | sendValidateFilePost | POST /send/validate/file | Validate an invoice file |
| SendApi | sendValidateJsonPost | POST /send/validate/json | Validate an invoice by json |
| SendApi | sendValidatePost | POST /send/validate | Validate an invoice |
| SendApi | sendValidateXmlPost | POST /send/validate/xml | Validate an invoice by xml |
| SendApi | sendXmlPost | POST /send/xml | Add an invoice by xml |
| StatusApi | statusGet | GET /status | Account status |
| UpdateApi | updateGet | GET /update | List updates |
| UpdateApi | updateIdGet | GET /update/{id} | Get an update by id |
| WebhookApi | webhookGet | GET /webhook | List webhooks |
| WebhookApi | webhookIdDelete | DELETE /webhook/{id} | Delete a webhook by id |
| WebhookApi | webhookIdGet | GET /webhook/{id} | Get a webhook by id |
| WebhookApi | webhookPost | POST /webhook | Add a webhook |
| WebhookApi | webhookPut | PUT /webhook | Update a webhook |
| WebhookApi | webhookhistoryGet | GET /webhookhistory | List webhook history items |
| WebhookApi | webhookhistoryIdGet | GET /webhookhistory/{id} | Get a webhook history item by id |
Models
- Company
- DocumentData
- Error
- Event
- ProblemDetails
- Receive
- Send
- SendReduced
- Status
- Update
- WebHook
- WebHookHistory
Authorization
Authentication schemes defined for the API:
Basic
- Type: HTTP basic authentication
Tests
To run the tests, use:
composer install vendor/bin/phpunit
Author
About this package
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
1.14.0- Generator version:
7.20.0
- Generator version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen
invoicetronic/php-sdk 适用场景与选型建议
invoicetronic/php-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 45 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 07 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「rest」 「api」 「sdk」 「openapi」 「openapitools」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 invoicetronic/php-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 invoicetronic/php-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 invoicetronic/php-sdk 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
Api bundle
Alfabank REST API integration
A Flickr wrapper to allow you to call the Flickr api with Guzzle as the backend.Goal is to have 100% Flickr api coverage rather than just upload/display photos (currently at 23%).
BlockCypher's PHP SDK for REST API
Helper classes for creating cookie headers
统计信息
- 总下载量: 45
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 31
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-16