Download the PHP package tudorr89/fgo-php-api-sdk without Composer

On this page you can find all versions of the php package tudorr89/fgo-php-api-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package fgo-php-api-sdk

FGO API PHP Client

PHP Version Packagist

A fully-typed PHP client for the FGO Invoicing/Billing API v7.0.
Create and manage invoices, query nomenclatures, list articles, and more — with clean DTOs and Guzzle under the hood.


Requirements


Installation


Quick Start


Laravel

The package ships with auto-discovered service provider and facade — no manual registration needed.

Configure

Add to .env:

Use it

Or via DI:

Multi-tenant / credentials from the database

When each tenant (or merchant, or user) has their own FGO credentials, point the package at a resolver instead of reading from .env. Implement FgoApi\Laravel\Contracts\CredentialsResolver:

Register it in config/fgo.php:

Then:

A closure is also accepted if you don't want a dedicated class:


Authentication

All requests are signed with an SHA-1 hash. The Hash helper provides the correct calculation for each endpoint category:

The Client handles hashing automatically — you never need to call these directly.


API Reference

Invoices

Method Endpoint Description
invoices()->create(...) POST /factura/emitere Create and emit a new invoice
invoices()->print($num, $serie) POST /factura/print Generate PDF download link
invoices()->getStatus($num, $serie) POST /factura/getstatus Get invoice value and paid amount
invoices()->cancel($num, $serie) POST /factura/anulare Cancel (keeps in history)
invoices()->delete($num, $serie) POST /factura/stergere Permanently delete
invoices()->reverse($num, $serie) POST /factura/stornare Reverse / credit note
invoices()->addPayment(...) POST /factura/incasare Record a payment (Premium+)
invoices()->deletePayment($num, $serie) POST /factura/stergereincasare Delete a payment
invoices()->addTrackingNumber(...) POST /factura/awb Attach courier AWB
invoices()->listAssociated($num, $serie) POST /factura/listfacturiasociate List linked invoices (Enterprise)

Nomenclatures

Method Returns
nomenclatures()->countries() All countries
nomenclatures()->counties() All counties
nomenclatures()->vatRates() VAT rates
nomenclatures()->banks() Banks
nomenclatures()->paymentTypes() Payment types
nomenclatures()->invoiceTypes() Invoice types
nomenclatures()->clientTypes() Client types (PF/PJ)
nomenclatures()->localities('Bucuresti') Localities by county code

Articles

Method Description
articles()->list($page, $perPage) Paginated article list (Enterprise)
articles()->get($code) Single article by account code
articles()->getList(array $codes) Multiple articles, max 30 — deprecated
articles()->modifiedArticles($hoursBack, $hoursTo) Articles modified in time window (Enterprise)

Warehouses


Environments


Exception Handling

All exceptions extend FgoApi\Exceptions\FgoApiException:

Exception Trigger
FgoApiException Generic API error (non-success response)
AuthenticationException HTTP 401 — invalid credentials
RateLimitException HTTP 429 — rate limit hit
NotFoundException HTTP 404 — resource not found
HttpException Other HTTP errors (includes status code + body)
ValidationException Validation errors

Rate Limits

The API enforces per-endpoint rate limits. The client does not automatically retry — implement your own retry logic as needed:

Endpoint Limit
Invoice create / payment 1 req/sec, 15s timeout
Articles 1 req/5 sec
Standard endpoints No explicit limit

Development


License

MIT. See LICENSE.

Resources


All versions of fgo-php-api-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
guzzlehttp/guzzle Version ^7.0
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tudorr89/fgo-php-api-sdk contains the following files

Loading the files please wait ...