ZuloOne
English
Sign inTry it
Menu

Connect a second bank

Updated

A legal entity can keep its statements from more than one bank. Besides PrivatBank (Autoclient), the Ukrainian pack reads monobank through its open API: the account of a sole proprietor (ФОП), and the accounts of the clients who gave their accountant access. A statement is fetched with the Fetch from the bank button on a bank statement, and the morning job reads the last days into the register.

Note

The statement is read, never written to: ZuloOne asks the bank for the statement and does not send payments through this connection. The token stays on the server; the card holds only its name. No live monobank account was available when this was built — see what has not been checked against a live bank.

Before you start#

  1. In the bank, get a token for the API: for monobank, sign in at https://api.monobank.ua/ and take the personal token. A sole proprietor's accountant takes the token of her own account: the clients who gave her access appear on it.
  2. Ask an administrator to put the token on the server as the credential mono-romashka (Integration__Credentials__mono-romashka) and to add the host api.monobank.ua to the allowed outbound hosts (Integration__AllowedHosts). The token goes neither into git nor onto the card.
  3. On General ledger → Setup → Bank accounts check that the bank account has its Account number (IBAN).

How to#

Open General ledger → Setup → Bank connections and press New.

Field What to put
Code mono-romashka — the name the channel uses for this connection
Name monobank ФОП Романенко
Legal entity the owner of the account
Base URL https://api.monobank.ua
Credential reference mono-romashka — the name the server holds the token under
Account / IBAN the IBAN of the account, the same as on the bank account
Bank monobank
Account id at the bank leave empty: it is filled by the first statement request
Disabled off

Save. Then open General ledger → Operations → Bank statements, press New, pick the bank account, fill From and To (up to 31 days) and press Fetch from the bank.

The first press finds the account by its IBAN among the accounts of the token and the clients who gave access, keeps its id in Account id at the bank, and tells you to press again in a minute: monobank accepts one request a minute for a token. The second press fetches the statement. Later presses fetch at once, as long as a minute has passed since the last request.

The morning job (PullUaBankStatements, 06:20 UTC) reads the last three days of every enabled monobank connection into General ledger → Inquiries → PrivatBank statement lines, once, by the id of each operation. It waits out the one-request-a-minute limit itself.

Example

A sole proprietor's account UA213220010000026007233566001 on the token mono-romashka. On 1 December the bank holds three items: an incoming 1 200.00 from ТОВАРИСТВО З ОБМЕЖЕНОЮ ВІДПОВІДАЛЬНІСТЮ «ВОРОНА» (EDRPOU 3096889974, comment Оплата за товар згідно рахунку 77), a card payment of 95.00 and an amount of 300.00 that the bank has only blocked. Fetch from the bank for 01.12–02.12 adds two lines: +1 200.00 with the counterparty's name, IBAN and EDRPOU, and −95.00. The blocked amount is not a transaction yet and is not taken. Pressing again adds nothing: each line is known by the id the bank gave it. The date of a line is the date in Kyiv: an item at 22:30 UTC on 30 November is dated 1 December.

The amounts come in hryvnias (the bank gives kopecks); money in is positive, money out negative.

Use the PrivatBank connection as before#

A connection whose Bank is empty or PrivatBank is PrivatBank Autoclient, as before. A connection made before this field existed is PrivatBank. Each bank's job reads only its own connections.

If the command refuses#

What you see What to do
No bank connection with the account … The Account / IBAN of the connection is not the IBAN of the bank account, or the connection is Disabled, or it is of another legal entity
monobank accepts one request a minute Press Fetch from the bank again after the seconds the message names
monobank: no account with IBAN … on this token The token does not see the account. Use the token of the person who owns it, or whose accountant you are
monobank: the token is not valid (403) The credential on the server is empty or wrong. Ask an administrator to set it; do not type it on the card
monobank: too many requests (429) Someone else is using the token (a phone app, a second system). Wait a minute and try again
monobank gives the statement for at most 31 days at a time Fetch a shorter period, or fetch several
Credential 'mono-romashka' is not configured The server has no token under that name, or the host is not allowed
The register is empty the next morning The connection is Disabled, the credential is missing, or the token was revoked in the bank. The job's log names the connection and the reason

See also

Same topic for other readers: Analyst · Developer

Was this page helpful?