Download the PHP package konekt/factureaza-sdk without Composer
On this page you can find all versions of the php package konekt/factureaza-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download konekt/factureaza-sdk
More information about konekt/factureaza-sdk
Files in konekt/factureaza-sdk
Informations about the package factureaza-sdk
PHP 8.1 SDK for factureaza.ro API
This package provides a PHP SDK for interacting with the factureaza.ro GraphQL API.
Installation
The minimum requirement of this package is PHP 8.1.
To install this library in your application, use composer:
Usage
Live or Sandbox
To connect to the live system, use the connect
method and pass your api key:
To connect to the sandbox system, use the sandbox
method:
Time Zone
The factureaza.ro API returns dates in the Romanian time zone (Europe/Bucharest). This SDK returns dates in that timezone by default.
If you want dates to be returned in UTC, call the useUTCTime()
method:
Create an Invoice
Document States
Invoices and other documents can have 4 states: draft
, open
, closed
, cancelled
.
When creating an Invoice, it will have the open
state by default.
If you want to create an invoice with a different initial state, use one of the following
methods on the CreateInvoice
class:
asDraft()
asClosed()
asCancelled()
or:
Retrieve Invoice PDF
The PDF of an Invoice can be retrieved in base64 encoded format:
Retrieve a Single Invoice
Unique invoices can be retrieved by id:
Find Clients
You can retrieve a client either by its Factureaza ID, or by tax number (cod fiscal).
Find a Client by Factureaza ID
Find a Client By Other Fields
By Tax Number:
By E-mail address:
By name:
Create a Client
Factureaza identifies clients based on their taxNo
(uid
in Factureaza API) field,
which represents either the tax number (CIF/CUI) of a company or the
personal identification number (CNP) of a natural person.
If you try to create a client with a taxNo
that already exists, a ClientExistsException
is thrown.
All versions of factureaza-sdk with dependencies
konekt/enum Version ^3.0|^4.0
illuminate/http Version ^8.22.1|^9.0|^10.0|^11.0
guzzlehttp/guzzle Version ^7.4
nesbot/carbon Version ^2.53.1