PHPackages                             patryk-sawicki/fakturownia - 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. [API Development](/categories/api)
4. /
5. patryk-sawicki/fakturownia

ActiveLibrary[API Development](/categories/api)

patryk-sawicki/fakturownia
==========================

PHP client for Fakturownia API

1.4.2(5y ago)054MITPHPPHP ^7.1 || ^8.0

Since Dec 30Pushed 5y agoCompare

[ Source](https://github.com/patryk-sawicki/fakturownia)[ Packagist](https://packagist.org/packages/patryk-sawicki/fakturownia)[ RSS](/packages/patryk-sawicki-fakturownia/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (1)Versions (14)Used By (0)

Fakturownia (InvoiceOcean)
==========================

[](#fakturownia-invoiceocean)

PHP client for Fakturownia (InvoiceOcean) API ([fakturownia.pl](https://fakturownia.pl), [invoiceocean.com](https://invoiceocean.com)).

Requirements
------------

[](#requirements)

- PHP 7.1 or higher with curl and json extensions.

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

[](#installation)

The recommended way to install is through [Composer](http://getcomposer.org).

```
$ composer require patryk-sawicki/fakturownia
```

Supported API tokens
--------------------

[](#supported-api-tokens)

Fakturownia.pl provides two types of tokens - with prefix (i.e. with your subdomain) and without prefix. Only **tokens with prefix** are supported. You can generate it in fakturownia.pl service (Settings -&gt; Account settings -&gt; Integration -&gt; Show ApiTokens -&gt; Add new Token -&gt; Kind: Token with a prefix).

Available methods
-----------------

[](#available-methods)

- login(string $login, string $password)
- getInvoices(array $params = \[\])
- getInvoice(int $id)
- createInvoice(array $invoice)
- updateInvoice(int $id, array $invoice)
- deleteInvoice(int $id)
- sendInvoice(int $id)
- changeInvoiceStatus(int $id, $status)
- getRecurringInvoices(array $params = \[\])
- createRecurringInvoice(array $recurringInvoice)
- updateRecurringInvoice(int $id, array $recurringInvoice)
- getClients(array $params = \[\])
- getClient(int $id)
- getClientByExternalId(int $id)
- createClient(array $client)
- updateClient(int $id, array $client)
- getProducts(array $params = \[\])
- getProduct(int $id, int $warehouseId = null)
- createProduct(array $product)
- updateProduct(int $id, array $product)
- getWarehouseDocuments(array $params = \[\])
- getWarehouseDocument(int $id)
- createWarehouseDocument(array $warehouseDocument)
- updateWarehouseDocument(int $id, array $warehouseDocument)
- deleteWarehouseDocument(int $id)
- getWarehouses(array $params = \[\])
- getWarehouse(int $id)
- createWarehouse(array $warehouse)
- updateWarehouse(int $id, array $warehouse)
- deleteWarehouse(int $id)
- getCategories(array $params = \[\])
- getCategory(int $id)
- createCategory(array $category)
- updateCategory(int $id, array $category)
- deleteCategory(int $id)
- getAccount()
- createAccountForClient(array $account, array $user = \[\], array $company = \[\])
- getPayments(array $params = \[\])
- getPayment(int $id, array $params = \[\])
- createPayment(array $payment)
- updatePayment(int $id, array $payment)
- deletePayment(int $id)
- getDepartments(array $params = \[\])
- getDepartment(int $id)
- createDepartment(array $payment)
- updateDepartment(int $id, array $department)
- deleteDepartment(int $id)

Examples of usage
-----------------

[](#examples-of-usage)

### Example 1 - Get invoices

[](#example-1---get-invoices)

```
$fakturownia = new \Abb\Fakturownia\Fakturownia('fakturownia_api_token');
$response = $fakturownia->getInvoices();
if ($response->isSuccess()) { // check response status
    $invoices = $response->getData();
} else {
    $errors = $response->getData();
}
```

### Example 2 - Get invoices by parameters

[](#example-2---get-invoices-by-parameters)

```
$fakturownia = new \Abb\Fakturownia\Fakturownia('fakturownia_api_token');
$params = [
    'period' => 'this_month',
    'page' => '1',
];
$invoices = $fakturownia->getInvoices($params)->getData();
```

### Example 3 - Get invoice by ID

[](#example-3---get-invoice-by-id)

```
$fakturownia = new \Abb\Fakturownia\Fakturownia('fakturownia_api_token');
$invoiceId = 123456;
$invoice = $fakturownia->getInvoice($invoiceId)->getData();
```

### Example 4 - Create an invoice

[](#example-4---create-an-invoice)

```
$fakturownia = new \Abb\Fakturownia\Fakturownia('fakturownia_api_token');
$invoiceData = [
    'kind' => 'vat',
    'number' => null,
    'sell_date' => '2013-01-16',
    'issue_date' => '2013-01-16',
    'payment_to' => '2013-01-23',
    'seller_name' => 'Wystawca Sp. z o.o.',
    'seller_tax_no' => '5252445767',
    'buyer_name' => 'Klient1 Sp. z o.o.',
    'buyer_email' => 'buyer@testemail.pl',
    'buyer_tax_no' => '5252445767',
    'positions' => [
        [
            'name' => 'Produkt A1',
            'tax' => 23,
            'total_price_gross' => 10.23,
            'quantity' => 1,
        ],
        [
            'name' => 'Produkt A2',
            'tax' => 0,
            'total_price_gross' => 50,
            'quantity' => 3,
        ],
    ],
];
$createdInvoice = $fakturownia->createInvoice($invoiceData)->getData();
```

### Example 5 - Create an invoice and send to client by email

[](#example-5---create-an-invoice-and-send-to-client-by-email)

```
$fakturownia = new \Abb\Fakturownia\Fakturownia('fakturownia_api_token');
$invoiceData = [
    'buyer_email' => 'buyer@testemail.pl',
    // ...
];
$response = $fakturownia->createInvoice($invoiceData);
if ($response->isSuccess()) {
    $createdInvoice = $response->getData();
    $fakturownia->sendInvoice($createdInvoice['id']); // Invoice will be sent to buyer_email
}
```

### Example 6 - Update invoice

[](#example-6---update-invoice)

```
$fakturownia = new \Abb\Fakturownia\Fakturownia('fakturownia_api_token');
$invoiceId = 123456;
$invoiceData = [
    'buyer_name' => 'Nowa nazwa klienta Sp. z o.o.',
    'positions' =>  [
        [
            'id' => 32649087,
            'name' => 'Nowa nazwa pozycji na fakturze',
        ],
    ],
];
$updatedInvoice = $fakturownia->updateInvoice($invoiceId, $invoiceData)->getData();
```

### Example 7 - Delete invoice

[](#example-7---delete-invoice)

```
$fakturownia = new \Abb\Fakturownia\Fakturownia('fakturownia_api_token');
$invoiceId = 123456;
$result = $fakturownia->deleteInvoice($invoiceId)->getData();
```

More info about the required parameters for every method: [PL](https://app.fakturownia.pl/api) | [EN](http://app.invoiceocean.com/api).

Changelog
---------

[](#changelog)

Changelog is available [here](CHANGELOG.md).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 79.6% 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 ~118 days

Recently: every ~89 days

Total

11

Last Release

1870d ago

PHP version history (3 changes)1.0.0PHP &gt;=5.4.0

1.3.0PHP ^7.1

1.4.0PHP ^7.1 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/e2276e6082c07c002d8b66093671feaf3f1306bd8aa6ced5c0769a46a7bb9ff6?d=identicon)[patryk-sawicki](/maintainers/patryk-sawicki)

---

Top Contributors

[![mariusz-zajac](https://avatars.githubusercontent.com/u/22937140?v=4)](https://github.com/mariusz-zajac "mariusz-zajac (39 commits)")[![patryk-sawicki](https://avatars.githubusercontent.com/u/30780444?v=4)](https://github.com/patryk-sawicki "patryk-sawicki (10 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/patryk-sawicki-fakturownia/health.svg)

```
[![Health](https://phpackages.com/badges/patryk-sawicki-fakturownia/health.svg)](https://phpackages.com/packages/patryk-sawicki-fakturownia)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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