📜 ⬆️ ⬇️

ABBYY Cloud OCR SDK subscriptions: “shut up and take my money!”

Good news ™: now, in the ABBYY Cloud OCR SDK, in addition to a one-time purchase of pages, you can subscribe through PayPal. We have been planning this development for a long time, for quite a long time it was in beta for a limited number of users. Now subscriptions are available to everyone, and this post is about the various technical and social aspects of this epic development.

We need to start by answering the question "why." The answer to it: subscriptions are convenient and understandable to many users. Although buying page packs is also convenient and easy, the user needs to keep track of the rest of the application pages and buy more pages. The service is able to send a warning about the imminent exhaustion of the rest of the pages, but the user can skip it. If the user forgets to purchase additional pages, his application may, at the most inappropriate moment, finish spending the rest of the pages and stop working.

The captain suggests a solution: automation. The user can continue to purchase packages of pages, and can subscribe. Of course, you can stop the subscription at any time, in this case, the positive balance of the pages will not change, it can be spent later.
')
We tried to make the subscription logic as clear as possible and at the same time user-friendly.

All subscriptions in the service - with a monthly replenishment of the rest of the pages: once a month the agreed amount is debited and the balance is replenished to the agreed date. The number of pages that can be processed, in principle, is not limited - you can “go into a minus”, but you will have to pay extra for this later, the surcharge is also debited automatically. “Care in the minus” is a very important feature of TM , it protects user applications from a sudden stop in the event that the monthly subscription volume is exhausted.

If the “minus” is not very deep, at the end of the period not only the monthly fee will be charged, but also the payment for the pages processed in excess of the calculated amount. If a user’s application processes many pages and the balance goes into a deep minus, the service, without waiting for the next monthly write-off, automatically charges the user with as many pages so that the balance becomes zero, and charges the user for the charged pages.

Additional charging can occur almost as often as desired as the remaining pages are reduced each time a certain threshold is reached, which depends on the monthly subscription volume.

With this scheme of page addition between monthly write-offs, users can react faster if their applications began to process more pages than they previously expected. The most obvious possible causes are an increase in processed volumes or a logical error in the user application. It is EXTREMELY UNEXPECTABLE to find out about the write-off of the tenfold subscription price accumulated during the month at the end of the month - dubious joy.

Sometimes users ask for the option to prohibit repossession or otherwise limit the volume of pages per month in order to protect themselves from over-spending. For now, we believe that this is an artificial demand. No matter how the restriction is made, it implies a certain threshold for the value of the remaining pages, upon reaching which the user's application will stop working. The user must somehow know it in advance. If the user makes a downward error, his application stops unexpectedly. If the user makes a mistake in a big way - he will be upset because of excessive write-off. Therefore, for the case when you need to strictly limit costs, the answer is buying packages, you will not go wrong with them.

Subscriptions are based on “reference transactions” in PayPal .

When creating a subscription, the service calls PayBal's CreateBillingAgreement method, which returns a link to the confirmation page on the PayPal site. The user goes to the PayPal site and there confirms the creation of a “billing agreement”. Further, the service, specifying the agreement identifier, can write off almost any amounts from the user at any time by calling the DoReferenceTransaction method.

The service calls DoReferenceTransaction once immediately after the successful execution of CreateBillingAgreement, then every time a month passes from the previous monthly write-off and every time the threshold is reached at which you need to add pages between the monthly write-offs. The amount charged is calculated each time depending on the reason for a particular write-off and the number of pages; it may be different.

Yes, that's right - you can take and write off at any desired moment as much as almost any amount will be charged .

PayPal reference transactions is a very powerful mechanism. When working with it, it is necessary to track (record on the service side) all completed write-offs and their amounts, as well as to take all reasonable technical measures to reduce the number of logical errors that could lead to unfair write-offs.

The user, of course, sees all debits in his PayPal account and in case of disagreement with any debit, he may decide to challenge him - as usual when using PayPal. A large number of unfair write-offs not only can ruin the reputation of the service, but also fairly add to the work of its owners - it will be necessary to respond to the claims, there will be no time left to view the tape with the seals .

It is important to make the implementation of write-off logic reliable, predictable and verifiable, but this is not enough. It is also very important to make write-offs as clear as possible for users.

The most important thing is that users should not have even a shadow of doubt that the subscription is unlimited and is valid until the moment of cancellation. It is not enough to write “a monthly payment - so much money” in the showcase, it is also necessary to explicitly indicate in the showcase and notifications that the monthly subscription fee is charged automatically and unconditionally until the subscription is canceled.

It is also considered to be a good form to warn about the cancellation of a monthly payment for several days - it happens that users subscribe, then stop using the service and forget about the subscription. It is more convenient and more efficient to warn them and give them a prior cancellation of the subscription, than they later turn to support or try to challenge the debit in PayPal. If the user has reason to believe that he has been misled, he may turn to the local regulator or to the court, in this case the costs will be much higher than the monthly fee charged.

Wrong: “We have charged you a monthly subscription fee.” That's right: “we have charged you a monthly fee and will write it off every month until you cancel the subscription on this page [and link]”.

Wrong: “for page overrun is written off ...”. Correctly: “it is possible to process more pages than is included in the monthly subscription volume, in this case the rest of the pages of the application can become negative, for all pages processed in excess of the monthly volume, an additional fee will be charged”.

If done correctly, users are not only happy to part with the money, but also ask, "where to put the card in, so that the crash will be written off as much as necessary." With subscriptions, they no longer need to keep track of the rest of the pages and it is unbearably tedious to click the mouse several times for each purchase.

Dmitry Mescheryakov,
product department for developers

Source: https://habr.com/ru/post/318328/


All Articles