PHPackages                             szymsza/laravel-fakturoid - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. szymsza/laravel-fakturoid

ActiveLibrary[Payment Processing](/categories/payments)

szymsza/laravel-fakturoid
=========================

Fakturoid Laravel Wrapper

v2.1(1y ago)045MITPHPPHP ^8.0

Since Aug 16Pushed 1y agoCompare

[ Source](https://github.com/szymsza/laravel-fakturoid)[ Packagist](https://packagist.org/packages/szymsza/laravel-fakturoid)[ Docs](https://github.com/szymsza/laravel-fakturoid)[ RSS](/packages/szymsza-laravel-fakturoid/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (7)Versions (5)Used By (0)

Laravel Fakturoid v3
====================

[](#laravel-fakturoid-v3)

Simple wrapper for the official PHP package  supporting the recent version 3

### Docs

[](#docs)

- [Installation](#installation)
- [Configuration](#configuration)
- [Examples](#examples)
- [Upgrade Guide](#upgrade-guide)

Installation
------------

[](#installation)

### Step 1: Install package

[](#step-1-install-package)

Add the package in your composer.json by executing the command.

```
composer require szymsza/laravel-fakturoid
```

This will both update composer.json and install the package into the vendor/ directory.

### Step 2: Configuration

[](#step-2-configuration)

First initialise the config file by running this command:

```
php artisan vendor:publish --provider="WEBIZ\LaravelFakturoid\FakturoidServiceProvider" --tag="config"
```

With this command, initialize the configuration and modify the created file, located under `config/fakturoid.php`.

Configuration
-------------

[](#configuration)

```
return [
    'account_name' => env('FAKTUROID_NAME', 'XXX'), // URL slug of your account
    'account_api_id' => env('FAKTUROID_API_ID', 'XXX'), // found in your Fakturoid user account settings
    'account_api_secret' => env('FAKTUROID_API_SECRET', 'XXX'), // found in your Fakturoid user account settings
    'app_contact' => env('FAKTUROID_APP_CONTACT', 'Application '), // linked to the application you are developing
];
```

Examples
--------

[](#examples)

### Create Subject, Create Invoice, Send Invoice (API v3-style)

[](#create-subject-create-invoice-send-invoice-api-v3-style)

```
use Fakturoid;

try {
    // create subject
    $subject = Fakturoid::getSubjectsProvider()->create([
        'name' => 'Firma s.r.o.',
        'email' => 'aloha@pokus.cz'
    ]);
    if ($subject->getBody()) {
        $subject = $subject->getBody();

        // create invoice with lines
        $lines = [
            [
                'name' => 'Big sale',
                'quantity' => 1,
                'unit_price' => 1000
            ],
        ];

        $invoice = Fakturoid::getInvoicesProvider()->create(['subject_id' => $subject->id, 'lines' => $lines]);
        $invoice = $invoice->getBody();

        // send created invoice
        Fakturoid::getInvoicesProvider()->fireAction($invoice->id, 'deliver');
    }
} catch (\Exception $e) {
    dd($e->getCode() . ": " . $e->getMessage());
}
```

### Create Subject, Create Invoice, Send Invoice (old API-style)

[](#create-subject-create-invoice-send-invoice-old-api-style)

```
use Fakturoid;

try {
    // create subject
    $subject = Fakturoid::createSubject(array(
        'name' => 'Firma s.r.o.',
        'email' => 'aloha@pokus.cz'
    ));
    if ($subject->getBody()) {
        $subject = $subject->getBody();

        // create invoice with lines
        $lines = [
            [
                'name' => 'Big sale',
                'quantity' => 1,
                'unit_price' => 1000
            ],
        ];

        $invoice = Fakturoid::createInvoice(array('subject_id' => $subject->id, 'lines' => $lines));
        $invoice = $invoice->getBody();

        // send created invoice
        Fakturoid::fireInvoice($invoice->id, 'deliver');
    }
} catch (\Exception $e) {
    dd($e->getCode() . ": " . $e->getMessage());
}
```

Upgrade Guide
-------------

[](#upgrade-guide)

If you used the older version of this package communicating with Fakturoid API v2 (pre-March 2024), an **update is required** before the old API version gets turned off on 31st March 2025.

Standard upgrade guide:

1. Update the package to the latest version using Composer.
2. Update your configuration in `config/fakturoid.php` (see [Configuration](#configuration)) or delete your `config/fakturoid.php` and publish the configuration again (see [Installation: Step 2](#step-2-configuration)).
3. Edit your configuration in `.env`:
    - Remove `FAKTUROID_EMAIL` and `FAKTUROID_API_KEY`
    - Add `FAKTUROID_API_ID` and `FAKTUROID_API_SECRET` with credentials found in your Fakturoid user account settings

If you only used basic Fakturoid functionality, all might work as usual at this point. If not, the issue might be of two types:

### Changes of the underlying API

[](#changes-of-the-underlying-api)

Arguments and return types of Fakturoid API v3 calls are not always the same as in v2 - e.g., `proforma` boolean has been replaced by a `document_type` attribute when fetching invoices.

To see if you need to provide different arguments of should expect different return values, please consult the [official Fakturoid API changelog](https://www.fakturoid.cz/api/v3/changelog).

### Changes of the underlying PHP library

[](#changes-of-the-underlying-php-library)

The PHP library this package provides a facade to has changed significantly. Although this wrapper tries to cover up most of these changes to make your code backwards compatible, some less commonly used methods or generally edge cases might case a problem. This can be usually recognized by a `BadMethodCallException: Method 'XXX' does not exist on Fakturoid instance.` or a similar exception thrown by the wrapper or the PHP library.

To solve this issue, please consult the [PHP library documentation](https://github.com/fakturoid/fakturoid-php) to learn how to call your functionality in the new API format (viewing the [README diff](https://github.com/fakturoid/fakturoid-php/commit/207e12a7b495c14882b6566ebd03ed00236953a2#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5) might come in handy). E.g., to create a subject, instead of calling

```
Fakturoid::createSubject([...]);
```

you would now use

```
Fakturoid::->getSubjectsProvider()->create([...]);
```

as can be seen in the README diff on line 27, resp. 172.

If you do run into such unhandled comatibility problem, please consider submitting a pull request to the V2Compatibility trait of this package, or at least opening an issue in this repository.

License
-------

[](#license)

Copyright (c) 2019 - 2020 webiz eu s.r.o MIT Licensed.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance42

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~284 days

Total

3

Last Release

484d ago

Major Versions

v1.0 → v2.02024-04-21

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12534237?v=4)[Jakub Szymsza](/maintainers/szymsza)[@szymsza](https://github.com/szymsza)

---

Top Contributors

[![dominik-wbz](https://avatars.githubusercontent.com/u/8103258?v=4)](https://github.com/dominik-wbz "dominik-wbz (10 commits)")[![szymsza](https://avatars.githubusercontent.com/u/12534237?v=4)](https://github.com/szymsza "szymsza (10 commits)")

---

Tags

laravelecommerceinvoicingwebiz

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/szymsza-laravel-fakturoid/health.svg)

```
[![Health](https://phpackages.com/badges/szymsza-laravel-fakturoid/health.svg)](https://phpackages.com/packages/szymsza-laravel-fakturoid)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M993](/packages/statamic-cms)[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4851.0k](/packages/sebdesign-laravel-viva-payments)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.0k](/packages/simplestats-io-laravel-client)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
