Request a Quote
14 November 2021

How to Organize Method of Payment in Bot System?

Are you looking to do the implement payments systems?
Merehead is a leading software development company. Talk to our experts to get a turn-key solution! Write to an Expert
Chatbots — a unique technology that changes e-commerce right before our eyes. Product sellers and suppliers can increase their income up to 25%, attract up to 9.5% more clients and improve the communication with clients up to 35%. The customers adore chatbots, since they help to find the goods fast, get instant feedback and answers, and make the purchase right in the dialogue window on Facebook, Slack, WhatsApp, Telegram, Viber or other popular messengers.

We also recommend reading - machine learning in 2022.

In this article we will share the details on how to organize the payment system for your business in a chatbot, what you will need for it and how much it costs.

How works a chatbot for payment systems

When you start your e-commerce project, you have 3 main options of payment organization. The first option is to hire a manager, who will accept phone calls, answer messages in chats and communicate with the client, he will know your banking data, will accept the transactions on your account and prepare the order for shipping. It is expensive, lasts long and is uncomfortable.

The second option — integrating a payment system like PayPal, Stripe or Amazon Pay. This approach makes purchasing easier, more comfortable and fast for the client. That is why this method of payment has almost completely substituted the manual payment processing. However, there are risks for personal data theft, including banking data of clients, but many businesses take the risk because this method is extremely simple.

The third one — payments through chatbots. For example,  according to the idea of this method, when a client buys an H&M hoodie through a chatbot the process of payment becomes automatic. The client goes to the purchase ordering interface, shares the banking and product information, then the transaction goes to the credit card issuer, which accepts the transaction or declines it if there is not enough money on the card. If the transaction is accepted, the credit card issuer sends the money to the seller.

In contrast with the payment system, the H&M chatbot is not a cashier here, it is a concierge. It is not processing the payment, but collects data and sends it to the bank or the payment system. The transaction is processed on the bank or payment system server, as a result all the risk are on the supplier of the payment service. Thereby, the business can focus on the sales, without dealing with the payment issues like how to make it fast and secure.

How to integrate a chatbot into your business

Middleware payment solution. To organize online payments on your website or application you will need an API payment system integration (Stripe, EasyPay, Amazon Pay, PayPal) or a bank. Your bot will accept the clients’ payment requests for a product or service and redirect it to a software, which is kind of a mediator between the bot and the payment system or bank. The client will share his credit bank card information and the submission code. After the transaction is closed, this software redirects the client back to the chatbot menu and shows the result of the transaction.

Here is an example of how the Middleware solution looks if it is integrated with PayPal API for Facebook.

This is the most common method of payment system integration. It is simple and can be used with any messenger, website chat or application.

API messenger payment solution. This method is available for Facebook, Messenger, Telegram, Viber and some other applications. The idea is that you can relatively easily add a chatbot to these messengers, the payments are processed in-app and its servers (not on your store). It is simpler than an integration of an API bank or payment system, but this feature is available only in a few messengers, and it is not supported in all countries.

According to this approach, the payment organization in a chatbot is easy. When the client hits the «Buy» button, the dialogue window appears, where the price, the product and the payment method is displayed. Moreover, the seller can ask for additional information, like Full name, phone number, email, address. When the client fills in the information and taps pay, the system asks for submission and then does the checkout. As a result, the seller (the owner of the chatbot) gets the payment for the product or service, and the client receives a confirmation message.

The API Facebook Messenger payment. Source

In Telegram everything goes quite the same. The owner of the bot adds the purchase button, which is activated by a single tap. It asks the client for information, payment and shipment methods. Then comes the confirmation message and the transaction is closed. Everything is fairly clear. Furthermore, Telegram chatbots support payment solutions like Stripe, Paymentwall, Payme and Yandex.Money.

Purchasing a product in Telegram. Source

Bots with limited choice of payment systems. This solution, from the payment method supplier, offers to add only their payment system to the chatbot. For example, the Masterpass Chatbot by MasterCard. As a result, only those users who have a Masterpass account can use the system. The others need to create one or find a different payment method. This is an example of how the communication flow looks like:

Simple data transfer scheme by Masterpass Chatbot. Source

The advantages of this solution are simplicity and functionality. You can use QR codes for offline purchases through Masterpass.

How complicated chatbot system do you need for your business?

Simple dialogue script. This is the most simple and common solution for payments through chatbots and e-commerce in general. A narrow range of commands can be accomplished, in the question-answer format. Usually, there are some already prepared answers, basically these are buttons, not lines for text input. The size of the script is usually between 3-7 answers. These bots are designed for special functions, for example pizza ordering (Dom Pizza bot) or for product purchasing on Facebook from a small store.

Smart assistant (basic AI). This solution is based on artificial intellect. It offers a much better user experience, because it can communicate with the customer. The Gwyn chatbot is a clear example that helps the 1-800-Flowers clients to choose and order flowers. Gwyn is quite advanced and understands a variety of questions and requests in the text messages format.

The dialogue of a Gwyn client and the chatbot in the 1-800-Flowers store. Source

The communication is effective, and it can help to sort the options, make a deal, pay the purchase, trace the shipment. And the bigger the client base gets (big data), Gwyn learn how to answer more and more questions. It is possible, because 1-800-Flowers invested in AI in the partnership with IBM Watson program.

Smart agents (Strong AI). This type of chatbots is the most innovative, it can communicate with the clients like a real person. Some programs like this one can pass the Turing test, if the interlocutor is a simple person not an AI specialist. These bots combine strong AI and machine learning based on neural networks. The examples are: Alexa (Amazon), Cortana (Microsoft), Siri (Apple) and Watson (IBM).

An example of Alexa’s abilities by Amazon. Source

To organize payments through chatbot systems, the script is the most common solution.  It handles most of the clients requests in the e-commerce sector, starting with payments and ending with contextual recommendations. The cost of this solution is much cheaper than developing an AI bot that uses neural networks.

Which features to add to a payment chatbot

Who makes a payment chatbot


You can organize the chatbot payment system in a constructor for beginners, like PandorabotChatfuelBotsifyBotkitDialogflow, Engati. But be ready that you will need to put in a lot of effort to learn how to do it, and you will not have any guarantees that your chatbot will work properly. To avoid these issues, hire a professional specialist. It will cost some money, but it will pay off soon.

Custom development

If template solutions are not meeting your requirements, or you need a relatively complicated and unique chatbot, you will need the assistance of a company-developer, like Merehead. They will help you find the aims of your project, they will analyze the market for you, and will develop a special interface.

The process of creating a bot is the following:

Backend. The server part of the chatbot works on the requests received from the messengers and application/site chats. You can make a backend bot from scratch, but it is better to use instruments like and Microsoft Bot Framework. These platforms will allow you to create a simple script based bot, or a more complicated system.

Here is how a complicated chatbot system may look.

The architecture of a corporate level bot based on Azure Bot Framework. Source

What concerns the technological stack, when the custom development is applied for bot development, it may vary. But if you use a framework, there will be less available instruments. Here is an example of a recommended technological stack needed to organize payments though a bot system based on Azure Bot Framework.

Client communication channels.These are the messengers and other platforms, which bots use to communicate with users. It can be a chat built on the website, Facebook Messenger, WhatsApp, Telegram, Skype, Slack. For each channel, a communication module with the backend channel is created.

Natural Language Processing (NLP).In order to communicate with the user in one language and understand their requests, the bot needs an integration of Natural Language Processing. It responds to text understanding and building the answers.

The development team needs to indicate the object that exists in your platform, so the NLP service will work properly. Usually, these are things like products, catalogs, contacts etc. Also,  you will need to integrate the validation rules for the business logic of the bot.

Dialogue system of the bot.It is based on the NLP and is sort of a navigation map, which will be used by the developers to project the bot. To introduce this dialogue system, the team creates an algorithm for each dialogue situation in case it is a simple bot. For complex bots, special rules for artificial intellect work are developed for each action.

An example of a dialogue navigation map. Source

Dialogue interface of a bot.It allows the clients to communicate with the bot. Usually it is a messenger chat window that can not be customized, but the communication can be improved by developing a message menu, interactive buttons, tables, hints, carousels and product cards.

Chatbot security.All the payment information that will be processed through the bot should be encrypted. Your bot should communicate only through the Secure Sockets Layer (SSL) protocols, it will encrypt the data on both sides. Moreover, to organize the payments through a bot system, you will need to integrate the Payment Card Industry Data Security Standard (PCI DSS). It will provide the security for all transactions on credit and debit cards.
Contact us
Your Name*:
Your Email*: