Development of custom integration with the WayForPay payment system

18 September 2024

next article
Srgiy Tadlya

Backend Developer

Srgiy Tadlya
Development of custom integration with the WayForPay payment system

Today, it is not necessary to explain in detail why a business needs integration with a payment system. When the vast majority of Internet users visiting your site have bank cards and are willing to use them to easily purchase your goods and services, denying them that option is simply a business crime and disrespectful to customers. However, the question always arises, which payment system to choose and to whom to entrust the integration process? Today we will talk about WayForPay solution and note its main features and advantages. However, do not forget that Avivi's long-term experience in creating integrations allows you to solve this issue for any platforms and services.

Prerequisites for creating integration

Avivi is currently developing a large commercial project of a trading platform for a food company with a large product list and many business process features. One of the important issues is the ability for customers to pay for orders online without complicated manipulations and unnecessary expectations. Using a payment system in this case is an obvious solution, as it allows:

  • Legally and transparently receive payments for products from buyers;

  • Automate the payment process;

  • Enable customers to easily pay for orders;

  • Realize the individual needs of business processes.

The WayForPay payment system was chosen by Avivi`s clients independently, so the task of our developers was to develop a custom integration. The trading platform was developed in the Python language on the framework Django, which allows you to implement the management system of all necessary business processes. Simple and clear interface of the admin panel Django facilitates the work of company employees and interacts with developers, because the basic functionality already includes the ability to delimit access rights and display information.

About WayForPay

Payment aggregator WayForPay provides users with extensive options for receiving payments from customers, and developers with proven methods and documentation to create effective integrations. The payment system offers users free connection and has a fixed fee of 2% of the transaction amount. Services for providing payment methods include: Google Pay and Apple Pay, purchasing in installments, processing payments from Visa and MasterCard cards and many others popular in the world. The company also helps to receive payments through QR codes, collect donations , receive fees for freelancers and even create their own landing pages for business promotion.

From the point of view of Avivi developers, it is, first of all, an extensive base of described APIs for creating integrations, which speeds up the process and optimizes the work of ready-made solutions. WayForPay provides a wide list of methods and explanations, which improves the quality of the code and allows you to implement almost any need of customers.

Peculiarities of integration work

The main task of integration with the payment system is to solve the issue of receiving payments from customers, i.e.:

  • Make a payment;

  • Provide the payment system with information regarding the payment;

  • Get payment confirmation.

It is clear that all this should work not only correctly, but also as quickly as possible, so as not to cause inconvenience to the buyer. During operations, the trading platform exchanges data with the payment system in a two-way mode, so speed and data security should be ensured.

An interesting feature of the integration with WayForPay is the organization of the logic of work algorithms, which is reduced to the necessary minimum. In this way, both the required speed and reliability are achieved, because the less data is transferred between software products, the easier it is to monitor their security.

The main binding of the decision comes down to the Payment. This is an entity in the admin panel Django, which is formed on the basis of data processing from the customer's order.

bbf67de84fc37da3.png

As you can see, the order also contains information about the responsible manager of the company and customer information. Any order can be checked and edited by an administrator.

Payments created on the basis of orders include a list of goods selected by the buyer. Each product contains a set of unique characteristics (price, dimensions, description, image, etc.) and is stored in a common database.

4900ecae1a117233.png

For example, we added all three test products from the screenshot above to the order. So now the generated payment for integration with WayForPay will contain all the necessary information, and the list of products in the order looks like this:

fd604870ffd63a6e.png

Now consider the payment directly. Each of them contains information about the number of goods and the amount to be paid by the buyer. It is important that it is here that you can automatically or manually assign possible discounts or other promotional offers. Unlike the others, the payment has statuses, that is, information about the payment: by default, a new payment is created as unpaid, but after the payment system responds, its status will change to "Paid". The automatic operation of two-way integration is responsible for this.

51a33f71f408d08e.png

And the most interesting thing. When all the necessary actions are completed and changes (if necessary) are made, the platform transmits only one value to the payment system - the internal identifier of a specific payment ( id ). After that, a link is generated that directs the user to WayForPay for payment. As you can see below, on the page the user sees a list of selected products and the amount to be paid, taking into account the applied discount of 10%. All you have to do is fill in your bank card details and click "Pay".

6dc7db8b26683fa6-2.png

Advantages and conclusions

So, in conclusion of the story about the custom integration created by Avivi developers , we can note the simplicity, effectiveness and reliability of the finished solution. Note that this is not a universal or template solution, since the customer clearly outlined the requirements of his company's business processes, laid down the need to review and edit each stage in the algorithm that forms the customer's order. However, the great advantage of integration is the immutability of the structure of the code we have created, regardless of how many products will be in the order, what characteristics will be changed or what new promotions marketers will invent. Everything will work equally correctly and quickly thanks to the optimized and structured code.

WayForPay integration is the readiness of our solution for adaptation to any other trading platform. To integrate an online store or CRM system that your business already uses, you just need to additionally create in Django :

  • Product model;

  • Order model;

  • If similar logic is used — database models of managers and customers. If this is not provided, these data are not needed (and vice versa: if other data are needed, then additional mozhdels need to be created).

These databases can be filled both manually and using custom API methods with your business platform, which fully automates the information synchronization process. So we will be happy to help you integrate with the WayForPay payment system and receive more payments from your customers!

Baner articles 2023.png


Similar articles
Apply for a consultation

We will reach out to within 10 minutes