🏦 Bank files and bank APIs of the Ukrainian pack
Updated
What the Ukrainian pack reads from a bank, what it writes for a bank, in which formats, and what has and has not been checked against a real bank. Where to click: Import a bank statement, Connect a second bank, Send payments to the bank as a file.
What goes in and out#
| Direction | What | Where it lands |
|---|---|---|
| In, a file | Client-bank text file, MT940, CSV, camt.053 | Lines of a Bank statement |
| In, an API | PrivatBank Autoclient, monobank open API | Lines of a Bank statement (the button) and the register of statement lines (the morning job) |
| Out, a file | The payment orders of posted payments | A client-bank text file that the person imports, checks, signs and sends |
Nothing in this list sends a payment to a bank, and nothing creates a payment from a statement without a person pressing Post matched lines.
The client-bank text file#
The tagged text file that most Ukrainian internet-banking systems export for an accounting program, and import payment orders from. One tag per line, Tag=Value; the tag names are Russian words, whatever the language of the text.
| Part | Tags | Meaning |
|---|---|---|
| First line | a signature ending in ClientBankExchange |
the format |
| Header | ВерсияФормата (1.02 or 1.03), Кодировка (Windows, DOS or UTF-8), Отправитель, Получатель, ДатаСоздания, ВремяСоздания, ДатаНачала, ДатаКонца, РасчСчет (one per account), Документ (the kinds asked for) |
who, when, which accounts and period |
| Balances | СекцияРасчСчет … КонецРасчСчет with РасчСчет, НачальныйОстаток, ВсегоПоступило, ВсегоСписано, КонечныйОстаток |
opening and closing balance of an account |
| A document | СекцияДокумент=Платежное поручение … КонецДокумента: Номер, Дата, Сумма, ДатаСписано (debited), ДатаПоступило (credited), ПлательщикСчет, Плательщик, ПлательщикИНН, Плательщик1, ПлательщикБанк1, ПлательщикБИК, the same for Получатель…, НазначениеПлатежа (or НазначениеПлатежа1…6) |
one payment |
| End | КонецФайла |
In a Ukrainian file …ИНН carries the EDRPOU code (or a sole proprietor's tax number), …БИК the bank code (МФО), and the account tags carry a 29-character IBAN. A one-line Плательщик (ИНН 12345678 Name р/с …) is read when the separate tags are absent.
A small statement, for one account, with one incoming payment:
<the signature line, ending in ClientBankExchange>
ВерсияФормата=1.02
Кодировка=Windows
РасчСчет=UA213223130000026007233566001
СекцияРасчСчет
РасчСчет=UA213223130000026007233566001
НачальныйОстаток=5000.00
КонечныйОстаток=6200.00
КонецРасчСчет
СекцияДокумент=Платежное поручение
Номер=15
Дата=01.12.2026
Сумма=1200.00
ПлательщикСчет=UA903052990000026001234567890
ПлательщикИНН=31234567
Плательщик1=Harbour Trading House
ПолучательСчет=UA213223130000026007233566001
ДатаПоступило=01.12.2026
НазначениеПлатежа=Payment for goods under invoice 77
КонецДокумента
КонецФайла
The account is the recipient's, so the document is money in: +1 200.00 on 01.12.2026, from Harbour Trading House, EDRPOU 31234567, with the opening balance 5 000.00 and the closing balance 6 200.00.
How a document becomes a line. The statement's account decides: it is the document's recipient account — money in, the payer is the counterparty; it is the payer account — money out, the recipient is the counterparty; it is neither — the document belongs to another account of the file and is not read. The value date is ДатаПоступило for money in and ДатаСписано for money out, else Дата. An IBAN, MFO/account and the plain number of one account are the same account.
Code pages. UTF-8 (with or without a byte order mark) is taken as it is. A file that is not valid UTF-8 is read as Windows-1251 and as the DOS code page with the Ukrainian letters (CP1125), and the reading that gives Cyrillic text wins. The DOS page of banks that use the plain CP866 differs from CP1125 only in a few letters (і, ї, Ґ); a file whose Ukrainian letters come out wrong should be exported again as Windows-1251 or UTF-8.
MT940#
The SWIFT customer statement: :20: reference, :25: account, :28C: statement number, :60F: opening balance, then per transaction :61: (value date YYMMDD, D/C or reversal RD/RC, amount with a decimal comma, the bank's reference after //) and :86: (information for the account owner), :62F: closing balance. A SWIFT envelope ({1:…}{4: … -}) around it is accepted.
The :86: text is read in three styles: ZKA subfields (?20…?29 the purpose, ?32 ?33 the name, ?31 the account), slash codes (/NAME/…/IBAN/…/EDRPOU/…/REMI/…), and free text, where a Ukrainian IBAN in the text is the counterparty's account and a code after ЄДРПОУ is its code. :25: may be an IBAN with the currency after it, MFO/account, or the account alone.
Matching by the code the bank states#
A line keeps the code the bank states for the other side. The matching finds a customer or supplier by it (the registration or tax number of the party), and the Ukrainian pack also by the party's EDRPOU field. If more than one party has the code, none is chosen.
monobank open API#
Source: the official description at https://api.monobank.ua/docs/ (the machine-readable copy of v250818 is kept by the community at github.com/andrew-demb/monobank-api-community-docs).
| Item | What the description says |
|---|---|
| Host | https://api.monobank.ua |
| Authentication | the header X-Token with the personal token from https://api.monobank.ua/ |
| Accounts | GET /personal/client-info: accounts[] (id, iban, type — fop for a sole proprietor, currencyCode) and managedClients[] with their accounts[]: the clients who gave an accountant access |
| Statement | GET /personal/statement/{account}/{from}/{to}: from and to in Unix seconds, at most 31 days and 1 hour (2 682 000 s) a request; account is the id from client-info or 0 for the default account |
| Limit | one request a minute for each of the two methods |
| An item | id, time (Unix), description, mcc, hold (a blocked amount), amount and balance (minor units of the account currency), comment, receiptId, invoiceId, and, on a sole proprietor's account, counterEdrpou, counterIban, counterName |
| Errors | 403 token, 429 limit, with {"errorDescription": …} |
Decisions: a line is known by the item id; a blocked item (hold) is not a transaction yet and is not taken; the date of a line is the date in Kyiv (UTC+2, UTC+3 in summer); the statement is asked for in windows of at most 31 days; a full answer is followed back in time (the description of this version states no number of items per answer; the 500 that earlier descriptions gave is assumed, and this was not verified); the job takes the last three days and the dedupe by id makes the overlap harmless; the button never waits the minute out, the job does.
The corporate API of monobank for service providers (own key signing) is not used: the personal API is meant for a person's own data and an accountant's clients, and a service that gathers other people's data centrally is asked to use the corporate one. A project that does that should plan the corporate API.
The payment order file#
The same tag format, written. The header carries the account and the period; each order is one СекцияДокумент=Платежное поручение with the fields of the printed payment instruction: the number, the date, the amount with a decimal point, the payer's account, EDRPOU and bank code, the recipient's, and the purpose of at most 160 characters. The file is made in Windows-1251 (default), DOS, or UTF-8, from the setting Payment file encoding. Version 1.02 is written, which importers of version 1.03 read too.
What has not been checked against a live bank#
- No live account. No PrivatBank or monobank account was available. The API readings are written from the descriptions and tested on samples built from them, with a stub in place of the network: the account lookup, the limit, the answers 403, 429 and 400, the 31-day window and the paging.
- The files of each bank. The tag set above is the common format. Banks differ in small things (the DOS code page, which tags they fill, the name of the document kind). The reader is tolerant, but a bank's file that does not read is a case to send to the analyst. The same for the import of the payment file: it was checked by reading it back with the same reader, not by a bank's import.
- MT940 of Ukrainian banks. Read in the styles above; a bank that puts the other side in another way gives lines with the text as the purpose and no name.
- Creating a payment through PrivatBank's API. Not built: see Send payments to the bank as a file.
- Other banks' APIs. Two more were looked at and not built. Raiffeisen Bank Ukraine publishes an Open API in its cash management service (balances and an ISO 20022 statement, authorised by OAuth 2.0 and JWT) that is switched on after the application is signed with a КЕП (
raiffeisen.ua, corporate clients, Open API). Oschadbank publishes an Open Banking API for third-party providers (balance and history of at most 31 days, payment initiation, only with the client's consent;openbanking.com.ua, Oschadbank). Both need a contract or a provider registration, have no public sandbox and no endpoint description a customer can use alone, so none could be tried and none was guessed at. An ISO 20022 statement downloaded from either bank imports today as a camt.053 file. - Salary registers and ISO 20022 payment files: not built. The connection has a Bank field so that a third bank is a new service, not a new dictionary.
Same topic for other readers: User · Developer