PHPackages                             firewalker/fio-client-php-7.4 - 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-php-7.4

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

firewalker/fio-client-php-7.4
=============================

PHP client for the Fio Bank API with DTO support

v1.0.1(1mo ago)00MITPHPPHP &gt;=7.4

Since Apr 21Pushed 1mo agoCompare

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

READMEChangelogDependencies (5)Versions (3)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 7.4+.

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

34

—

LowBetter than 75% of packages

Maintenance91

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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

Every ~7 days

Total

2

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 (11 commits)")

---

Tags

psr-7psr-18fiophp clientFio bankbanking apitransaction api

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k532.1M2.5k](/packages/aws-aws-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k11](/packages/tempest-framework)[neuron-core/neuron-ai

The PHP Agentic Framework.

1.9k496.1k32](/packages/neuron-core-neuron-ai)[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)[spatie/laravel-export

Create a static site bundle from a Laravel app

670139.5k6](/packages/spatie-laravel-export)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M506](/packages/shopware-core)

PHPackages © 2026

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