
Automation of cashless payments

A few months ago, in order to improve the quality and increase the speed of servicing clients of legal entities (and individual entrepreneurs), a non-trivial task appeared - to exclude the human factor as much as possible and automate the transfer of funds received by bank transfer to the user's balance.
Cashless payment is the most advantageous way for accepting payment for an online service (if we consider just legal options), because excludes intermediaries in the form of payment systems that take their commission, for example:
- Webmoney Capitaller - 0.8% when transferring funds to a current account through the Guarantee Agency . Due to the extremely muddy purpose of the payment “In payment of the purchase of securities under the agreement ...”, the bank may have questions regarding the source of these funds, so it is most legal to accept Webmoney through processing when Webmoney assumes the functions of an agent for receiving payments. For Russia, this is Paymaster and the commission in this case is 2% , but with daily registries and legal purpose of payment.
- Bank cards (Internet acquiring) - commission from 2% to 3% . In the case of Topvisor, we use Internet acquiring from Tinkoff Bank and the commission for us is 2.5% .
- Paypal - 3.9% + 10 rubles.
- Yandex.Money ( Cashier for business ), QIWI and Robokassa - 5% .
Thus, we get a commission of payment systems from 2 to 5% against cashless payments - 0% . That is why an extremely important task was to simplify and automate the process of accepting non-cash funds as much as possible. The task was divided into several stages:
- Generation of invoices and contracts (if necessary).
- Control of receipt of funds (at least 1 time per hour).
- Generation of closing documents.
Invoice generation
It is necessary to request from the client the name and TIN of the organization, bank account number, BIC bank, legal and mailing address:
- In addition to the BIC number, the name and correspondent account of the bank is required, they can be automatically obtained through the BIC RF Directory API .
- A mailing address is required to know where to send the original documents after receipt of payment.
The data entry form may be as follows: It is

best to generate an invoice in PDF format . We initially made the HTML version, but faced with misunderstanding on the part of customers. No matter how technologically advanced the company is, ordinary accountants are responsible for the processing of incoming invoices (most often outsourced), so they need a familiar and convenient format.
There is no approved unified invoice form for the payment of goods and services. The form can be any, at the discretion of the company. An example of our account here . The client can be given the opportunity to immediately download the invoice, or send it by e-mail.
Control of receipt of funds
As it turned out the most difficult stage - a bank with a sane api serving legal entities could not be found right away. On the topic, it was possible to find only discussions on banki.ru and ixbt.com , a question on toster.ru and a discussion of the Wishlist on the Alfa-Bank ideas site .
Based on the analysis of all this information, there was only one bank with an API - SB Bank, integration documentation is here www.sbank.ru/Page/Details/internetbank/business/integr
Using the GetLatestAdvices functionyou can receive payment data for the current operational day (we make a request 1 time per hour) and automatically transfer funds to the user's balance. Reconciliation for the completed day can be performed entirely using the DownloadDailyDocuments function , as theoretically, when using only GetLatestAdvices, we may not see all payments.
Payment can be identified by TIN, account number or label in the payment purpose.
If the API constantly gives an error and you did not open an office in Moscow or St. Petersburg, then most likely the API is not deployed for your region, as it was with us (we became the first client using a bank api from St. Petersburg). This issue can be resolved with technical support.
A little later, I learned from Alfa-Bank managers (when I closed the account) that they also have something similar - the 1C integration channel , but to use it, you need to get approval.
Generation of closing documents
Upon receipt of payment to the account, we generate closing financial documents in PDF (in our case, the Act of performed services) and together with the original invoice we send it to the client's mailing address. All.
Campaigns in the mail during the implementation of the third paragraph can be avoided altogether if we switch to EDI (electronic document management). In Russia, this is quite realistic on the basis of 63-ФЗ “On electronic signature” , Article 6, paragraph 1:
Information in electronic form, signed by a qualified electronic signature, is recognized as an electronic document equivalent to a paper document signed with a handwritten signature, unless the federal laws or regulatory enactments adopted in accordance with them require that the document be drawn up exclusively on paper.
There are already services with API and established formats for this, but this is a topic for a separate article. I’ll write about the transition to EDI in hot pursuit, as soon as this functional will be implemented with us.