PHPackages                             firewalker/fio-client - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. firewalker/fio-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

firewalker/fio-client
=====================

PHP client for the Fio Bank API with DTO support

v1.0.0(1mo ago)03MITPHPPHP &gt;=8.3

Since Apr 28Pushed 1mo agoCompare

[ Source](https://github.com/Firewalker2600/fio-client)[ Packagist](https://packagist.org/packages/firewalker/fio-client)[ RSS](/packages/firewalker-fio-client/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (5)Versions (2)Used By (0)

---

FioClient PHP SDK
=================

[](#fioclient-php-sdk)

A PHP client for accessing the [Fio Bank API](https://www.fio.cz/), supporting retrieval of account statements and transactions in JSON, XML, or CSV format. The client provides raw responses as well as typed DTOs for easy consumption.

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

[](#installation)

Install via Composer:

```
composer require your-vendor/fio-client
```

> Requires PHP 8.3+.

Usage
-----

[](#usage)

### Basic Setup

[](#basic-setup)

```
use Firewalker\FioClient\Client\FioClient;
use GuzzleHttp\Client as HttpClient;
use Http\Discovery\Psr17FactoryDiscovery;

$httpClient = new HttpClient(); // any PSR-18 client
$requestFactory = Psr17FactoryDiscovery::findRequestFactory();

$token = 'YOUR_FIO_API_TOKEN';
$fio = new FioClient($token, $httpClient, $requestFactory);
```

### Fetch Transactions (Raw JSON)

[](#fetch-transactions-raw-json)

```
$from = new \DateTimeImmutable('2024-01-01');
$to = new \DateTimeImmutable('2024-01-31');

$raw = $fio->getTransactionsRaw($from, $to); // string
$data = json_decode($raw, true);             // array
```

### Fetch Transactions as DTO

[](#fetch-transactions-as-dto)

```
use Firewalker\FioClient\Dto\AccountStatementDto;

$dto = $fio->getTransactionsDTO($from, $to); // AccountStatementDto

echo $dto->accountNumber;
echo count($dto->transactions);
```

### Fetch Last Transactions

[](#fetch-last-transactions)

```
$rawLast = $fio->getLastTransactionsRaw();
$dtoLast = $fio->getLastTransactionsDTO();
```

### Fetch Transactions Since a Specific ID

[](#fetch-transactions-since-a-specific-id)

```
$rawSince = $fio->getTransactionsSinceIdRaw(12345);
$dtoSince = $fio->getTransactionsSinceIdDTO(12345);
```

### Set Last Transaction ID

[](#set-last-transaction-id)

```
$response = $fio->setLastId(12345); // raw API response
```

### Supported Formats

[](#supported-formats)

You can get responses in:

- JSON (default)
- XML
- CSV

```
$xml = $fio->getTransactionsRaw($from, $to, FioClient::FORMAT_XML);
$csv = $fio->getTransactionsRaw($from, $to, FioClient::FORMAT_CSV);
```

Exceptions
----------

[](#exceptions)

- **`App\Exception\HttpException`** — HTTP response code &gt;= 300.
- **`App\Exception\InvalidFormatException`** — invalid format passed to request.
- **`App\Exception\JsonException`** — invalid API response structure.
- **`\JsonException`** — native PHP JSON decoding errors.
- **`Psr\Http\Client\ClientExceptionInterface`** — HTTP client errors.

DTOs
----

[](#dtos)

The main DTO is `AccountStatementDto`, which contains:

- `accountId`
- `accountNumber`
- `currency`
- `transactions` — array of `TransactionDto` objects

Each `TransactionDto` contains details such as:

- `transactionId`
- `date`
- `amount`
- `counterpartyAccount`
- `counterpartyName`
- `variableSymbol`
- `message`
- `type`
- `performedBy`

Use DTOs when you want typed access to transaction data. Otherwise, raw JSON gives you the full API response as an array.

Example: Iterate Transactions
-----------------------------

[](#example-iterate-transactions)

```
$statement = $fio->getTransactionsDTO($from, $to);

foreach ($statement->transactions as $tx) {
    echo sprintf(
        "%s: %s %.2f (%s)\n",
        $tx->date,
        $tx->counterpartyName,
        $tx->amount,
        $tx->message ?? ''
    );
}
```

Notes
-----

[](#notes)

- All methods are **PSR-18 / PSR-17 compatible**, so any HTTP client implementing these standards works.
- DTO methods always return **JSON-decoded data**, even if the raw request was in XML or CSV, so JSON is recommended for DTOs.
- The client throws **explicit exceptions** for HTTP, invalid formats, and JSON errors.

License
-------

[](#license)

MIT

---

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance91

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

42d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0a880587a6bbf290b81546c4425e8c53be3eb9e3c9bc34a3c4c6e0175a7fb731?d=identicon)[Firewalker2600](/maintainers/Firewalker2600)

---

Top Contributors

[![Firewalker2600](https://avatars.githubusercontent.com/u/70068719?v=4)](https://github.com/Firewalker2600 "Firewalker2600 (7 commits)")

---

Tags

psr-7psr-18fiophp clientFio bankbanking apitransaction api

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/firewalker-fio-client/health.svg)

```
[![Health](https://phpackages.com/badges/firewalker-fio-client/health.svg)](https://phpackages.com/packages/firewalker-fio-client)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.1B3.7k](/packages/guzzlehttp-psr7)[cakephp/cakephp

The CakePHP framework

8.8k19.1M1.7k](/packages/cakephp-cakephp)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35729.6k2](/packages/telnyx-telnyx-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k11](/packages/tempest-framework)[elastic/transport

HTTP transport PHP library for Elastic products

2022.9M9](/packages/elastic-transport)[claude-php/claude-php-sdk

A universal, framework-agnostic PHP SDK for the Anthropic Claude API with PSR compliance

14440.4k2](/packages/claude-php-claude-php-sdk)

PHPackages © 2026

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