Download the PHP package apextechnology/tidybill without Composer
On this page you can find all versions of the php package apextechnology/tidybill. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package tidybill
apextechnology/tidybill
A framework-agnostic PHP SDK for the TidyBill invoicing API. Provides a typed client with DTOs for creating invoices, managing line items, and fetching clients. Works in any PHP project; Laravel users get an optional service provider via auto-discovery.
Requirements
- PHP ^8.2
ext-jsonguzzlehttp/guzzle^7.0
Installation
Plain PHP usage
You can also pass a custom GuzzleHttp\ClientInterface as the fourth argument for testing or advanced configuration:
Laravel usage
Laravel's package auto-discovery registers the service provider automatically. Publish the config file:
This creates config/tidybill.php. Set the following environment variables:
Resolve the client from the container:
Or inject it via the constructor in any Laravel service or controller.
Usage
Creating an invoice
Adding line items to an existing invoice
Fetching invoices
Managing line items
Fetching clients
E-invoicing
TidyBill generates and validates structured e-invoice documents from your invoices: ZUGFeRD / Factur-X (EN 16931) and UBL Peppol BIS Billing 3.0. These methods drive that generation and validation via the TidyBill API. They do not transmit invoices on the Peppol network; TidyBill produces the compliant document and you retrieve it.
EInvoiceFormat cases: EInvoiceFormat::ZugferdEn16931 ('zugferd_en16931') and EInvoiceFormat::UblPeppolBis3 ('ubl_peppol_bis3').
Error handling
DTO reference
CreateInvoiceData
| Property | Type | Default | Description |
|---|---|---|---|
clientId |
string |
required | TidyBill client ID |
issueDate |
string |
required | ISO 8601 date (e.g. 2026-05-01) |
currency |
string |
'ZAR' |
ISO 4217 currency code |
notes |
?string |
null |
Optional invoice notes |
lineItems |
LineItemData[] |
[] |
Line items to include on creation |
LineItemData
| Property | Type | Description |
|---|---|---|
description |
string |
Line item description |
quantity |
int |
Number of units |
unitPrice |
float |
Price per unit in the invoice currency (e.g. 1.50 for R1.50) |
Unit prices are converted to integer cents before being sent to the API.
InvoiceResult
| Property | Type | Description |
|---|---|---|
id |
int |
Invoice ID |
clientId |
string |
Client ID |
status |
string |
Invoice status |
issueDate |
string |
Issue date |
currency |
string |
Currency code |
total |
float |
Invoice total |
lineItems |
array |
Raw line items from the API |
raw |
array |
Full raw response |
LineItemResult
| Property | Type | Description |
|---|---|---|
id |
int |
Line item ID |
description |
string |
Description |
quantity |
int |
Quantity |
unitPrice |
float |
Unit price in currency's major unit |
total |
float |
Line item total |
ClientData
| Property | Type | Description |
|---|---|---|
id |
string |
Client ID |
name |
string |
Client name |
email |
?string |
Client email |
raw |
array |
Full raw response |
License
MIT