PHPackages                             klapuch/fakturoid-api - 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. klapuch/fakturoid-api

ActiveLibrary[API Development](/categories/api)

klapuch/fakturoid-api
=====================

Fakturoid PHP library

012PHP

Since Aug 17Pushed 9y ago1 watchersCompare

[ Source](https://github.com/klapuch/fakturoid-api)[ Packagist](https://packagist.org/packages/klapuch/fakturoid-api)[ RSS](/packages/klapuch-fakturoid-api/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Fakturoid PHP lib
=================

[](#fakturoid-php-lib)

PHP library for [Fakturoid.cz](https://www.fakturoid.cz/). Please see [API](http://docs.fakturoid.apiary.io/) for more documentation. New account just for testing API and using separate user (created via "Nastavení &gt; Uživatelé a oprávnění") for production usage is higly recommended.

Usage
-----

[](#usage)

```
require_once '/path/to/lib/Fakturoid.php';
$f = new Fakturoid('..subdomain..', '..user@email.cz..', '..api_key..', 'PHPlib ');

// create subject
$subject = $f->create_subject(array('name' => 'Firma s.r.o.', 'email' => 'aloha@pokus.cz'));

// create invoice with lines
$lines   = array(array('name' => 'Big sale', 'quantity' => 1, 'unit_price' => 1000));
$invoice = $f->create_invoice(array('subject_id' => $subject->id, 'lines' => $lines));

// send created invoice
$f->fire_invoice($invoice->id, 'deliver');

// to mark invoice as paid
$f->fire_invoice($invoice->id, 'pay'); // or 'pay_proforma' for paying proforma and 'pay_partial_proforma' for partial proforma
```

Handling errors
---------------

[](#handling-errors)

Library raises `FakturoidException` if server returns code `4xx` or `5xx`. You can get response code and response body by calling `getCode()` or `getMessage()`.

```
try {
  $subject = $f->create_subject(array('name' => '', 'email' => 'aloha@pokus.cz'));
} catch (FakturoidException $e) {
  $e->getCode(); // 422
  $e->getMessage(); // '{"errors":{"name":["je povinná položka","je příliš krátký/á/é (min. 2 znaků)"]}}'
}
```

### Common problems

[](#common-problems)

- ensure you have certificates for curl present - either globaly in `php.ini` or call `curl_setopt($ch, CURLOPT_CAINFO, "/path/to/cacert.pem")`
- in case of problem please contact our invoicing robot on

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17772194?v=4)[Dominik Klapuch](/maintainers/klapuch)[@klapuch](https://github.com/klapuch)

---

Top Contributors

[![lukaskonarovsky](https://avatars.githubusercontent.com/u/9624?v=4)](https://github.com/lukaskonarovsky "lukaskonarovsky (32 commits)")[![klapuch](https://avatars.githubusercontent.com/u/17772194?v=4)](https://github.com/klapuch "klapuch (6 commits)")[![edariedl](https://avatars.githubusercontent.com/u/163762?v=4)](https://github.com/edariedl "edariedl (1 commits)")[![vikijel](https://avatars.githubusercontent.com/u/2683048?v=4)](https://github.com/vikijel "vikijel (1 commits)")

### Embed Badge

![Health badge](/badges/klapuch-fakturoid-api/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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