Read movements by json file from Fio bank and send payments.

v3.0.1 2023-02-09 13:43 UTC


Downloads this Month Latest stable

Support Fio API. Read is provided via json file.


Here is changlog

Nette framework

Follow this extension.

Installation to project by composer

$ composer require h4kuna/fio

Not implemented

  • STA (MT940)
  • 5.3.2: Transakce z POS terminálů nebo platební brány obchodníka
  • 6.4.2: pain.008 (příkazy k inkasu)
  • only json for read movements
  • only xml for import

How to use

Here is example and run via cli. This script require account.ini in same directory, whose looks like.

account = 123456789
token = abcdefghijklmn

account = 987654321
token = zyxuvtsrfd

FioFactory class help you create instances of classes FioPay and FioRead.

use h4kuna\Fio;

$fioFactory = new Fio\FioFactory(parse_ini_file($ini, true));

$fioRead = $fioFactory->createFioRead('my-account');
$fioPay = $fioFactory->createFioPay('wife-account');

$fioRead2 = $fioFactory->createFioRead(); // first in list is default, [my-account]

You can use different config bud keep structure of php array

	'my-alias' => [
		'account' => '123456789',
		'token' => 'abcdefg'
	'next-alias' => [
		'account' => '987654321',
		'token' => 'tuvwxyz'


Read range between date.

use h4kuna\Fio;
/* @var $fioRead Fio\FioRead */
/* @var $list Fio\Read\TransactionList */
$list = $fioRead->movements(/* $from, $to */); // default is last week

foreach ($list as $transaction) {
    /* @var $transaction Fio\Read\Transaction */
    foreach ($transaction as $property => $value) {
        var_dump($property, $value);


You can download transaction by id of year.

use h4kuna\Fio;
/* @var $fioRead Fio\FioRead */
/* @var $list Fio\Read\TransactionList */
$list = $fioRead->movementId(2, 2015); // second transaction of year 2015

Very useful method where download last transactions.

After download it automatic set new break point.

use h4kuna\Fio;
/* @var $fioRead Fio\FioRead */
/* @var $list Fio\Read\TransactionList */
$list = $fioRead->lastDownload();
// same use like above

Change your break point.

By date.

$list = $fioRead->lastDownload();

By movement ID.

$list = $fioRead->lastDownload();
var_dump($list->getInfo()->idLastDownload); // 123456789

Tip: You can define own TransactionFactory and create instance and add to Read\Json::__construct()

Payment (writing)

Api has three response languages, default is set cs. For change:

/* @var $fioPay h4kuna\Fio\FioPay */

For send request is method send whose accept, file path to your xml or abo file or instance of class Property.

$myFile = '/path/to/my/xml/or/abo/file.xml'; // file extension is important

Object pay only to czech or slovak:

/* @var $national Fio\Pay\Payment\National */
$national = $fioPay->createNational($amount, $accountTo);
/* set next payment property $national->set* */

Euro zone payment:

/* @var $euro Fio\Pay\Payment\Euro */
$euro = $fioPay->createEuro($amount, $accountTo, $name);
/* set next payment property $euro->set* */

International payment:

/* @var $international Fio\Pay\Payment\International */
$international = $fioPay->createInternational($amount, $accountTo, $bic, $name, $street, $city, $country, $info);
/* set next payment property $international->set* */

Send more payments in one request:

foreach($pamentsRows as $row) {
	/* @var $national Fio\Pay\Payment\National */
	$national = $fioPay->createNational($row->amount, $row->accountTo);